home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / ds40bqb.zip / DS40.DOC < prev    next >
Text File  |  1992-05-24  |  148KB  |  3,526 lines

  1.  
  2.  
  3.                          Door Source - Version 4.0B
  4.                            Released May 16,1992
  5.                    Copyrighted 1989,1989,1990,1991,1992
  6.                               By Todd Miller
  7.  
  8.                               Support Boards:
  9.            PC-Technologies (Sysop Todd Miller)  (919) 294-1770
  10.           
  11.  
  12.                                Mail Support:
  13.                             PC-Technologies
  14.                             PO Box 77103
  15.                             Greensboro, NC 27417-7103
  16.  
  17.   Door Source 4.0B
  18.   Programmer's Manual - Page 2
  19.                          Table of Contents
  20.  
  21.   Disclaimer and Credits.............................................4
  22.  
  23.   Introduction.......................................................5
  24.  
  25.   The deal on NO registration........................................6
  26.  
  27.   Some Never Nevers..................................................7
  28.  
  29.   Quick Start........................................................8
  30.      Loading Door Source.............................................8
  31.      First few lines.................................................8
  32.  
  33.   Getting Started....................................................10
  34.  
  35.   Command line options...............................................
  36.  
  37.   Door Writing Techniques............................................16
  38.      Gathering data from the user....................................19
  39.      Making friendly menus...........................................20
  40.  
  41.   Finishing your door................................................23
  42.  
  43.   Getting more out of Door Source....................................25
  44.      The definable page sound........................................25
  45.      Two fancier input prompts.......................................26
  46.  
  47.  Advanced Techniques................................................29
  48.      Extra status line...............................................29
  49.      Writing your own I/O routines...................................30
  50.  
  51.   How a door works...................................................32
  52.  
  53.   Converting from 3.2 or before......................................33
  54.  
  55.   Summary of new features............................................34
  56.  
  57.   Appendix A - CALL Syntax...........................................35
  58.  
  59.   Appendix B - Optimizing your door..................................36
  60.  
  61.   Appendix C - Common Questions......................................37
  62.  
  63.   Appendix D - Variable Reference....................................38
  64.  
  65.   Appendix E - Script Commands.......................................41
  66.  
  67.   Appendix F - Command Reference.....................................53
  68.      AdjustTimeLimit.................................................54         
  69.      AllTrun$........................................................55
  70.      ANSIMusic.......................................................56      BackSpace.......................................................57
  71.      BackSpaceOver...................................................58
  72.      BackSpaceToCol..................................................59
  73.      BeepSpeaker.....................................................60
  74.      BlockSend.......................................................61
  75.      Center..........................................................62
  76.      ChangeCTS.......................................................63
  77.      ChangeDTR.......................................................64
  78.      ChangeRTS.......................................................65
  79.      CheckCarrier....................................................66
  80.      CheckTimeLeft...................................................67
  81.      ClrScrn.........................................................68
  82.      ColorEasy.......................................................69
  83.      CommInkey$......................................................70
  84.      CommKeyInkey$...................................................71
  85.      CopyAFile.......................................................72
  86.      DayOfWeek.......................................................73
  87.      DoorBusy........................................................74
  88.      EntryIncomm.....................................................75
  89.      ExtendedCode....................................................76
  90.      ExitDoor........................................................77
  91.      FileExist.......................................................78
  92.      FileOpen........................................................79
  93.      GameInfoUpdate..................................................80
  94.      GetTime.........................................................81
  95.      HighScores......................................................82
  96.      Incomm..........................................................83
  97.      MenuManager.....................................................85
  98.      MoveCursor......................................................86
  99.      NL..............................................................87
  100.      Parser..........................................................88
  101.      PromptIncomm....................................................89
  102.      QSend...........................................................90
  103.      RainbowSend.....................................................91
  104.      RandNum.........................................................92
  105.      ReadUsers.......................................................93
  106.      Send............................................................94
  107.      ShellToDos......................................................95
  108.      Sorter..........................................................96
  109.      SysopPage.......................................................97
  110.      TimeConvert.....................................................98
  111.      ViewFile........................................................99
  112.      WaitASec........................................................100
  113.      WindowInput.....................................................101
  114.      WindowPrint.....................................................102
  115.      Windows.........................................................103
  116.      WriteUsers......................................................104   Door Source 4.0B
  117.   Programmer's Manual - Page 4
  118.  
  119.         Disclaimer and Credits
  120.         ----------------------
  121.     This software (including instructions for its use) is provided "as is"
  122.     without warranty of any kine. Further, the author does not warrant,
  123.     guarantee, or make any representations regarding the use, or the results
  124.     of the use, of the software or written materials converning the software
  125.     in terms of correctness, accuracy, reliabilty, currentnes, or otherwise.
  126.     The entire risk as to the results and performance of the software is
  127.     assumed by you. If the software or written materials are defective, you,
  128.     and not the author or the author's distributors or employees, assume
  129.     the entire cost of all necessary servicing, repair, or correction.
  130.  
  131.     Neither the author nor anyone else who has been involved in the creation,
  132.     production, or delivery of this software shall be liable for any direct,
  133.     indirect, consequential, or incidental damages (including damages for
  134.     loss of business profits, business interruption, loss of business
  135.     information, and the like) arising out of the use of or inability of
  136.     to use such software. Distribution of the software is allowed as long
  137.     as it is in complete form as when you recieved it. Distribution of
  138.     the files without the documentation is not allowed. Distribution of the
  139.     libraries made by the installer program is not allowed.
  140.  
  141.     Sorry for such a long disclaimer, but you have to cover that legal stuff.
  142.  
  143.     QuickBasic (R) is a registered trade mark of Microsoft Corporation
  144.  
  145.     PCBoard (R) is a registered trade mark of Clark Development Company (CDC)
  146.  
  147.     MS-DOS (R) is a registered trade mark of Microsoft Corporation
  148.  
  149.     Door Source is copyrighted Computer City, USA 1988, 1989, 1990, 1991
  150.  
  151.  
  152.     Troy Getty - For helping in the testing of 4.0 and suggesting a
  153.         badly needed routine, ShellToDOS.
  154.  
  155.     Daniel Sharpe - For letting us put the RainbowSend command into Door
  156.         Source.
  157.  
  158.     Premo Mondone - Who has given me suggestions for 3.0 and above
  159.  
  160.     To all my competitors - Who give me inspiration to make this product
  161.         better than theirs. (And cheaper too!)
  162.   Door Source 4.0B
  163.   Programmer's Manual - Page 5
  164.  
  165.         Introduction
  166.         ------------
  167.            Welcome to Door Source! Door Source is a Quick Basic library,
  168.     intended for using with versions 4.0 and above. Door Source provides
  169.     you with a collection of routines to help you interface with a bulletin
  170.     board and the communications port to make a "door", or otherwise
  171.     referred to as a third party program, that adds onto the board.
  172.            Some people don't like having to read a large manual, and rather
  173.     jump right in with both feet and start off, if you would like to quickly
  174.     start, please read the following two sections after this introduction.
  175.     It is advised however, that you read Door Writing Techniques, and
  176.     Getting More out of Door Source too. If you have previously used
  177.     Door Source, you should refer to Converting from 3.2 or before and
  178.     also to the Summary of New Features. Door Source will also be
  179.     referred to as DS in this manual.
  180.            Door Source is provided to you free of charge, and you can
  181.     receive technical support at (919) 294-1770 (DATA 2400 max).
  182.     Door Source users will be given free access to the other nodes
  183.     after first calling the number above.
  184.  
  185.         Files included
  186.         --------------
  187.            Here is a list of files that you should have:
  188.  
  189.                 DS40    .DOC - Door Source 4.0B documentation
  190.                 DOORSORC.INT - Door Source 4.0B include file
  191.                 DSGAME  .INT - Door Source 4.0B include file
  192.                 WINDDEMO.BAS - Window demo using the Window routine
  193.                 MENUDEMO.BAS - Menu demo using the MenuManager routine
  194.                 PRMTDEMO.BAS - Prompts demo using various input routines
  195.                 BLCKDEMO.BAS - A demo using the UserBlock type declaration
  196.                 ERRDEMO .BAS - A demo with the CarrierLossError variable
  197.                 SAMPLE  .BAS - A sample door program written with Door Source
  198.                 MANUAL  .FRM - A form to order a printed manual with disks
  199.                 LOADQB  .BAT - A batch file to make loading DS easier
  200.                 DS00x   .DS4 - These are special files with extra routines
  201.                 DSINST  .EXE - This will help you select the right object
  202.                                files for the most compact DS library.
  203.                 DSINST  .DOC - Documentation on how to use the installer
  204.                 COMPRESS.ZIP - A program to compress the HighScores data files
  205.                 DOORINST.ZIP - A program to install your doors on other boards
  206.   Door Source 4.0B
  207.   Programmer's Manual - Page 6
  208.  
  209.         The deal on NO registration
  210.         ---------------------------
  211.            This may seem extremely odd, but Door Source is offered 100%
  212.         completely free. There are no registration fees, no more forms,
  213.         you don't ever have to send us a thing!
  214.            Why? Many years ago when Door Source was first started on,
  215.         I realized the need for a better product in the field of door
  216.         tool kits, and I decided that I would try to fill that gap, but
  217.         at no charge. All the other door kits (that I know of) ask for
  218.         some kind of registration, and I think this is truly one of the
  219.         first that requires none at all.
  220.            But I do like to know who is using Door Source, and a call to
  221.         PC-Technologies just to say thanks, or, better yet, to give a
  222.         suggestion for improvements, is always appreciated! If you have
  223.         a specific need for a routine or improvement to the Door Source
  224.         library, you can call and tell it to me, and you're guaranteed
  225.         that 90% of all improvements or suggestions are added within a
  226.         few releases!
  227.  
  228.   Door Source 4.0B
  229.   Programmer's Manual - Page 7
  230.  
  231.         Some Never Nevers
  232.         -----------------
  233.            There are some things you never should do when using Door Source.
  234.         What you shouldn't do is listed below, and since most people won't
  235.         believe it unless they know why, we have included reasons, and
  236.         in some cases, alternate routines to use instead.
  237.  
  238.         Never use CLS, VIEW PRINT, PRINT, LOCATE, or COLOR because
  239.            Door Source handles all screen output, and using these
  240.            will cause Door Source to lose some of its pointers on the
  241.            screen. Also, on systems using DesqView, it could cause lock ups.
  242.  
  243.         Never use OPEN COM or ON COM, because Door Source doesn't use
  244.            Quick Basic's communication routines, and using these would
  245.            cause a confliction of interrupts between Door Source and
  246.            Quick Basic, that would lead to unpredictable results.
  247.  
  248.         Never use SCREEN, because Door Source handles screen output,
  249.            it wouldn't be able to follow your change to a different
  250.            mode, and would cause serious problems.
  251.  
  252.         Never use END or SYSTEM, because that would cause Door Source
  253.            to leave its interrupt handlers still in place and the
  254.            next program to run would probably crash.
  255.  
  256.         Never use DEFINT, or any of DEF beside DEF FN, because
  257.            Door Source expects variables to be passed that are in
  258.            single precision format (the default of Quick Basic).
  259.  
  260.         Never use PLAY or SOUND, because it will cause a sound
  261.            when the sysop using your door program may not want sound,
  262.            like in the middle of the night, use BeepSpeaker instead
  263.            of BEEP or SOUND, and AnsiMusic instead of PLAY.
  264.  
  265.   Door Source 4.0B
  266.   Programmer's Manual - Page 8
  267.   
  268.      Quick Start
  269.      -----------
  270.  
  271.         Installing and loading Door Source
  272.         ----------------------------------
  273.            After you have unzipped the Door Source file (assuming that you
  274.         have since you're reading this), you will only need to copy a few
  275.         files into your Quick Basic sub-directory. All you will need to
  276.         do is run DSINST, the Door Source Installer, and then copy DS40.QLB
  277.         and DS40.LIB into your QuickBasic directory. Now you are ready
  278.         to load up Quick Basic, which you can do by typing:
  279.  
  280.            QB [your program name] /L DS40
  281.  
  282.            You also can add on a /CMD[command$ string] that would place
  283.         what you put there into COMMAND$ inside Quick Basic. This would
  284.         be used to easily specify your configuration file for the door,
  285.         an example is this:
  286.  
  287.            QB MYDOOR /L DS40 /CMDTESTDOOR.CFG LOCAL
  288.  
  289.            Putting a space in between the /CMD and TESTDOOR.CFG will
  290.         cause Door Source not to recognize your configuration file
  291.         properly.
  292.  
  293.         The First Few Lines
  294.         -------------------
  295.            Once inside the Quick Basic environment, ready to write a
  296.         new door program, the first line should always be:
  297.  
  298.         ' $INCLUDE:'DOORSORC.INT'
  299.  
  300.            This will tell Quick Basic to include this file into your
  301.         program. What this file contains is declarations for the
  302.         Door Source routines (to help eliminate errors), a COMMON SHARED
  303.         block, along with a few CONSTant declarations. At the end of the
  304.         file, it calls the InitDoor routine, which starts Door Source
  305.         rolling. The next line after that in your program should be:
  306.  
  307.         PROGNAME$ = "My Door"
  308.  
  309.            You should replace "My Door" with the name of your door. But
  310.         make sure that it is in quotations, or Quick Basic will give you
  311.         a Type mismatch error. The name placed in this string shouldn't
  312.         exceed 20 characters. The next line should be:
  313.  
  314.         RELEASE$ = "1.0"
  315.  
  316.  
  317.   Door Source 4.0B
  318.   Programmer's Manual - Page 9
  319.  
  320.            This is the release number (or version number) of your door
  321.         program. It should be less than 6 characters long, and can contain
  322.         letters and numbers (A-Z, a-z, 0-9), as well as punctuation.
  323.  
  324.         CALL ClrScrn
  325.  
  326.            CALL ClrScrn should be the next line in your program. It will
  327.         clear the screen, and now you almost ready to go on about your
  328.         door, however, there is one last thing. In the DOORSORC.INT, when
  329.         it calls InitDoor, it will leave a file open for you (file number 1)
  330.         and this file is the configuration file. If you would like to
  331.         INPUT anything from it, do that here, and once you are done inputing
  332.         anything else that was added onto the configuration file, or if
  333.         you didn't input anything at all, you will need to add one last
  334.         line, which is:
  335.  
  336.         CLOSE #1
  337.  
  338.            Now you are ready to write your door. A few basic routines that
  339.         you should look up are Send (on page XX), Incomm (on page XX),
  340.         ClrScrn (on page XX), and NL (on page XX). I'm sure you are
  341.         sick of reading this manual by now, but these are the 4 most
  342.         basic commands. You should also read Testing Your Door before you
  343.         try to run the door for the first time, because there are a few
  344.         things to make sure that you have in your program, and on your
  345.         disk in order for it to work.
  346.   Door Source 4.0B
  347.   Programmer's Manual - Page 10
  348.  
  349.         Getting Started
  350.         ---------------
  351.  
  352.         Writing a simple program in Door Source
  353.         ---------------------------------------
  354.            Before you can really do anything, you'll need to run the
  355.         Door Source Installer, DSINST, to create DS40.QLB and DS40.LIB.
  356.            Before loading Quick Basic, make sure that you have set the
  357.         proper environment strings to direct Quick Basic to your Door
  358.         Source directory (if you have one).
  359.            You will also need to make a configuration file that you
  360.         can use to test a simple door with. The Door Source configuration
  361.         file format is a simple four line file. You can make it longer
  362.         if your door needs information from it (see Advanced Techniques).
  363.         An example configuration file might be called TESTDOOR.CFG and look
  364.         like this:
  365.  
  366.         C:\PCB\PCBOARD.SYS
  367.         PC-Technologies
  368.         Todd
  369.         Miller
  370.  
  371.            The first line is a drive/path/filename to the bbs interface file,
  372.         and the second line is the name of the bbs using the door. The third
  373.         line is the first name of the sysop and the fourth line is the last
  374.         name of the sysop.
  375.            Now, load up Quick Basic, with the /L (library) switch on it like
  376.         this:
  377.  
  378.         QB /L DS40
  379.  
  380.            That will load up Quick Basic and the Door Source library. Two other
  381.         switches that you might use when loading Quick Basic are:
  382.  
  383.         /RUN             - This is put at the beginning of the line right after
  384.                            QB and will make Quick Basic run the file specified.
  385.         /CMDMYCONFIG.CFG - The /CMD option always comes at the end, and what
  386.                            comes DIRECTLY after the /CMD will be loaded into
  387.                            the COMMAND$, this simulates what you would have
  388.                            if someone loaded your program like this:
  389.                            MYDOOR MYCONFIG.CFG
  390.                            The MYCONFIG.CFG would be put in the COMMAND$, but
  391.                            if you want to test doors inside Quick Basic, you
  392.                            should use this option, or set the COMMAND$ from
  393.                            the Run menu in Quick Basic.
  394.  
  395.  
  396.   Door Source 4.0B
  397.   Programmer's Manual - Page 11
  398.  
  399.            Once Quick Basic is loaded, you should press ALT-R to get the
  400.         Run menu, and the select Modify COMMAND$ (If it isn't listed, then
  401.         go to the options menu and select Full Menus, then try again). Now
  402.         enter in the name of the configuration file that you made earlier
  403.         before loading (If you didn't make it, you can shell to dos from the
  404.         File menu and make it there). Put after the configuration filename,
  405.         the word LOCAL. LOCAL will tell Door Source to read the configuration
  406.         file, but not to use the BBS interface file. Door Source will prompt
  407.         you for a name, and if you want to use ANSI graphics. This way, you
  408.         don't have to worry about making a test PCBOARD.SYS, DORINFO1.DEF,
  409.         CALLINFO.BBS, or DOOR.SYS. If you didn't specify LOCAL, it would look
  410.         for the bbs interface file that you gave it.
  411.            Now type the following program into Quick Basic:
  412.  
  413.         ' $INCLUDE:'DOORSORC.INT'
  414.         PROGNAME$="Hello World"
  415.         RELEASE$="1.0"
  416.         CALL ClrScrn
  417.         CLOSE #1
  418.  
  419.         CALL Send("Hello World!",No,Yes,10)
  420.         CALL Incomm("How are you today, @FIRST@ ?",No,No,14)
  421.         CALL ExitDoor
  422.  
  423.            Press the F5 key and the program will run. If you receive an
  424.         error, refer to Common Questions to find a solution. You should
  425.         see Door Source ask you for a name, and if you want ANSI graphics.
  426.         Then the screen will clear and it will say Hello World! in High
  427.         Intensity Green, and the beneath that it will show How are you today,
  428.         with your first name. Enter in anything you want and press enter.
  429.         It will then say Closing Door... and more. You'll also notice that
  430.         at the bottom of the screen is a status line, and it will be
  431.         discussed later in this section. Now let's find out how this
  432.         program works.
  433.            First, the INCLUDE file has a lot of DECLAREs in it and a
  434.         COMMON SHARED block, it also makes a CALL to the Door Source
  435.         routine InitDoor. Inside InitDoor, Door Source will read the
  436.         configuration file, process the bbs interface file (in this
  437.         case, it will ask you for your name and if you want ANSI
  438.         instead), and it will set up the communications port if it
  439.         is going to be used.
  440.            In the next two lines, you set up two variables. PROGNAME$
  441.         should be the name of your program. RELEASE$ should be the
  442.         version number of your program. Door Source will display these
  443.         on the status line. PROGNAME$ shouldn't be bigger than 20 characters
  444.   Door Source 4.0B
  445.   Programmer's Manual - Page 12
  446.  
  447.         and RELEASE$ shouldn't be bigger than 5 characters. They both
  448.         can contain A-Z, a-z, 0-9, and punctuation.
  449.            Then you make a call to the Door Source routine ClrScrn, which
  450.         clears the screen (local and remote), and updates the status line.
  451.         At this point, if you had added onto the configuration file, you
  452.         would read it here, but since we didn't, we just close the file
  453.         that InitDoor left open for us.
  454.            The first four lines of the program above should be the first
  455.         four lines in all of your doors, except you would replace what
  456.         PROGNAME$ and RELEASE$ with information for your door.
  457.            Send is a Door Source routine that outputs (local and remote)
  458.         a string, and can optionly beep the speaker, and send a enter when
  459.         done. The number is the color number, here's the format for calling
  460.         Send.
  461.  
  462.         CALL Send("Hello World!", No, Yes, 10)
  463.                    ^              ^   ^    ^
  464.                    |              |   |    Color to use
  465.                    |              |   Send enter when done?
  466.                    |              Beep the speaker when done?
  467.                    What to output
  468.  
  469.            Incomm is another routine that outputs first and then waits
  470.         for input back. There are many options that you can use with
  471.         Incomm, most which are in global variables, which are covered
  472.         in the reference for it. Here's the way to call Incomm:
  473.  
  474.         CALL Incomm("How are you today, @FIRST@ ?", No, No, 14)
  475.                      ^                              ^   ^   ^
  476.                      |                              |   |   Color to use
  477.                      |                              |   Limit the length? If
  478.                      |                              |   so, max length.
  479.                      |                              Send enter before input?
  480.                      What to output first
  481.  
  482.            You may have noticed how @FIRST@ wasn't displayed on the screen,
  483.         but your first name was instead. That's because that when Door Source
  484.         sees one of these, it knows to replace it with what you want instead.
  485.         There is a complete list of these in Appendix D.
  486.            The last call is to ExitDoor, which closes up Door Source files
  487.         and removes the Door Source interrupt handlers. If you use END
  488.         instead of ExitDoor, then the interrupt handlers will remain in
  489.         place, causing the next program to run to crash. ExitDoor will
  490.         also insure that the caller stays connected while he/she is transferred
  491.         back to the bbs.
  492.  
  493.   Door Source 4.0B
  494.   Programmer's Manual - Page 13
  495.  
  496.         Colors
  497.         ------
  498.            Door Source can support foreground and background colors. There
  499.         are three different ways that you can use and change colors too.
  500.         Here's a color chart:
  501.  
  502.         #       Name           Hex     Foreground   Background
  503.         0       Black           0          Y            Y
  504.         1       Blue            1          Y            Y
  505.         2       Green           2          Y            Y
  506.         3       Cyan            3          Y            Y
  507.         4       Red             4          Y            Y
  508.         5       Magenta         5          Y            Y
  509.         6       Brown           6          Y            Y
  510.         7       White           7          Y            Y
  511.         8       Gray            8          Y            N
  512.         9       HiBlue          9          Y            N
  513.         10      HiGreen         A          Y            N
  514.         11      HiCyan          B          Y            N
  515.         12      HiRed           C          Y            N
  516.         13      HiMagenta       D          Y            N
  517.         14      Yellow          E          Y            N
  518.         15      HiWhite         F          Y            N
  519.  
  520.         Way #1 to use color
  521.         -------------------
  522.            CALL Send("Hello!",No,No,12)
  523.            CALL Send("Bye!",No,Yes,10)
  524.  
  525.            This would output Hello! in high intensity red and on the same
  526.            line it would put Bye! in high intensity green.
  527.  
  528.         Way #2 to use color
  529.         -------------------
  530.            CALL Send("Hello!",No,Yes,HiRed)
  531.            CALL Send("Bye!",No,Yes,HiGreen)
  532.  
  533.            This would output the same thing as above, the only difference
  534.            is that it is easier to read.
  535.  
  536.         Way #3 to use color
  537.         -------------------
  538.            CALL Send("Hello!@X0ABye!",No,Yes,12)
  539.  
  540.            This would output the same as the first and second way, but
  541.            this one does it with one string. The whole key to this method
  542.            is the @X0A code in the middle. It tells Door Source to change
  543.            colors.
  544.  
  545.   Door Source 4.0B
  546.   Programmer's Manual - Page 14
  547.  
  548.         Color Code
  549.         ----------
  550.            Here's how to use the special color codes:
  551.  
  552.                 @X0F
  553.                 ^^^^
  554.                 |||Foreground color
  555.                 ||Background color
  556.                 |Second part of signal code
  557.                 First part of signal code
  558.  
  559.            You can also change the background color by setting the
  560.            variable BackGroundColor to a color number on the chart
  561.            above that is valid a background color (0-7).
  562.  
  563.         Command Line Options
  564.         --------------------
  565.            Door Source has numerous command line options in order to provide
  566.         flexibility with most computer systems. Here is a list:
  567.  
  568.                 LOCKED:xxxxx  - Forces Dooor Source to lock the modem at the
  569.                                 speed given.
  570.                 LOCAL         - Forces Door Source to run in local mode. This
  571.                                 is really meant for testing purposes, but it
  572.                                 still reads the configuration file, but doesn't
  573.                                 read the bbs interface file.
  574.                 NETWORK       - Forces file sharing to be active incase you
  575.                                 are using something other than SHARE to manage
  576.                                 file locking.
  577.                 IRQ=n         - Lets you change the IRQ used for the com port
  578.                                 specified in the bbs interface file.
  579.                                 (See below for more information)
  580.                 ADDR=&Hnnnn   - Lets you change the address used for the com
  581.                                 port specified in the bbs interface file.
  582.                                 (See below for more information)
  583.                 PS2           - Forces the PS/2 IRQs and addresses if a PS/2
  584.                                 isn't detected (Normally it is, but you can't
  585.                                 always tell!)
  586.                 RBBS          - Forces Door Source into RBBS/QBBS mode
  587.                 WILDCAT       - Forces Door Source into Wildcat 2.0 mode
  588.                 DOORSYS       - Forces Door Source into 31-Line DOOR.SYS mode
  589.                 PCB121        - Forces Door Source into PCBoard 11.8/12.x mode
  590.                                 with COM 1 active
  591.                 PCB122        - Forces Door Source into PCBoard 11.8/12.x mode
  592.                                 with COM 2 active
  593.                 PCB14         - (DEFAULT) Forces Door Source into PCBoard 14.x
  594.                                 mode
  595.  
  596.   Door Source 4.0B
  597.   Programmer's Manual - Page 15
  598.  
  599.         When you use the IRQ or the ADDR option, you must include the other.
  600.         You can't use just the IRQ and not the ADDR, and you can't use just
  601.         the ADDR and not the IRQ. Here's a chart with the STANDARD IRQs
  602.         and addresses for the PS/2s and IBM PCs:
  603.                                 Non PS/2
  604.                 Com port       IRQ     Address
  605.                    1             4       &H3F8
  606.                    2             3       &H2F8
  607.                    3             4       &H3E8
  608.                    4             3       &H2E8
  609.                   5-8            4       &H3F8
  610.  
  611.                                 PS/2
  612.                 Com port       IRQ     Address
  613.                    1             4       &H3F8
  614.                    2             3       &H2F8
  615.                    3             3       &H3220
  616.                    4             3       &H3228
  617.                    5             3       &H4220
  618.                    6             3       &H4228
  619.                    7             3       &H5220
  620.                    8             3       &H5228
  621.  
  622.   Door Source 4.0B
  623.   Programmer's Manual - Page 16
  624.  
  625.         Door Writing Techniques
  626.         -----------------------
  627.            When writing a door, you should keep three concepts in mind, they
  628.         are:
  629.  
  630.         1) Compatibility
  631.         2) Flexibility
  632.         3) Multi-node
  633.  
  634.            A compatible door is a door that easily runs on several bbs types.
  635.         Door Source currently supports PCBoard 11.8+, PCBoard 14.x, WildCat,
  636.         RBBS/QBBS DORINFO1.DEF, and the 31-line version of DOOR.SYS. Modifying
  637.         specific detailed parts of the user's information makes the door
  638.         less portable, since not all systems have the same information as
  639.         others.
  640.            A flexible door is one that allows the sysop to EASILY tell the
  641.         game where things are, and to set the options that they want.
  642.         Options like a tournament mode, turns per day, plays per day, etc,...
  643.         are good options to have. Letting the sysop define text from the
  644.         door is stretching this a little, but some sysops like this feature.
  645.         Of course it does mean a lot of work on your part too.
  646.            A multi-node door is often the hardest to write, but not if you
  647.         know how. Really it is very easy, easier than most think. You first
  648.         have to decide how multi-node you want your door to get. For example,
  649.         you might not won't to try to program something to let two players
  650.         on at the same time attack each other, so maybe you don't let on
  651.         go into the same sector as another that is currently on, or you
  652.         could go for the more complex way and do a one-on-one active battle
  653.         mode (which players would like). But the one thing all multi-node
  654.         doors must do is to share files correctly, and the way to do this
  655.         is to open files as SHARED, and to LOCK and UNLOCK individual records.
  656.         You will also want to keep in contact with other nodes playing
  657.         your door at the same time, and this can be done with a simple file
  658.         that would be organized by node. It would tell the other nodes if
  659.         it was running maintenance (so the others would play while it was), or
  660.         to tell the other nodes where someone is. In the Door Source Door
  661.         tool kit, it contains routines to maintain a file, and others to
  662.         help make your door more multinode. A multi-node door is always
  663.         praised by the sysops of a multi-node system.
  664.  
  665.         Quick Basic problems
  666.         --------------------
  667.            Quick Basic does have a few problems, and you will encounter them
  668.         if you are working on a large door project. You will probably
  669.         encounter a "Out of Stack Space" or a "Out of Data Space" error.
  670.         I've found that exiting to DOS and then coming back will usually
  671.         solve the problem. If not, then its time to do some work on your
  672.         program. If you know that you're door will be large, or if your
  673.         door gets larger than you expected, then here are a few tips on
  674.         how to get rid of these problems, or to prevent them:
  675.   Door Source 4.0B
  676.   Programmer's Manual - Page 17
  677.  
  678.                 1) Use variables, not constants. When you call a routine,
  679.                    like Send, and pass it a constant, the space that the
  680.                    constant used is not released for other programs to use.
  681.                    Instead, it stays in memory until your program quits.
  682.                    So call Send or other routines this way, by defining your
  683.                    variable first.
  684.  
  685.                         Lin$="Hello!":ColorToUse=10
  686.                         CALL Send(Lin$, No, Yes, ColorToUse)
  687.  
  688.                    If you didn't set up the variables before hand, you
  689.                    would have just used up 12 bytes of stack space that
  690.                    wouldn't be made available for other things. (I didn't
  691.                    miscount, a string has a 4 byte discriptor on it.)
  692.  
  693.                 2) Use MAKEDS so that your Door Source library will be
  694.                    as small as possible, and so it won't take up extra
  695.                    space with routines you don't need.
  696.  
  697.                 3) Use as few variables as possible. You should set aside
  698.                    two or three variables for your loops, a few for input,
  699.                    and a few for output, etc,... Just don't go around
  700.                    putting in new variables, because it will eliminate
  701.                    stack space.
  702.  
  703.                 4) If you are using your own COMMON SHARED block, eliminate
  704.                    all unnecessary variables from it, and don't declare
  705.                    a function or subroutine as STATIC unless necessary.
  706.  
  707.         Large doors
  708.         -----------
  709.            When writing LARGE doors with Door Source, you should use
  710.         a multi-module program. To create a new module, you must select
  711.         the Create file option from the file menu (full menus only).
  712.         Here are some tips for writing large doors:
  713.  
  714.                 1) Make a COMMON SHARED block for each of your modules
  715.                    that has commonly used variables.
  716.  
  717.                 2) Include the DOORSORC.INT at the beginning of each module
  718.                    so that it can use the Door Source routines and variables.
  719.  
  720.                 3) Make as many things as possible a routine or a function,
  721.                    and place those routines and functions into a module of
  722.                    their own (You could even have several modules of routines).
  723.  
  724.                 4) Remember that you can't GOTO or GOSUB to a line number or a
  725.                    label in another module.
  726.  
  727.   Door Source 4.0B
  728.   Programmer's Manual - Page 18
  729.  
  730.                 5) Anything that is done more than once is a good candidate for
  731.                    routine or function, even if it just calculates a score
  732.                    or shows lots of information.
  733.  
  734.                 6) When calling routines (Door Source or your own), pass
  735.                    variables, not constants to them.
  736.  
  737.   Door Source 4.0B
  738.   Programmer's Manual - Page 19
  739.  
  740.         Gathering Data from the User
  741.         ----------------------------
  742.            When writing your door, you will want to keep a consistent, but
  743.         friendly and easy to use approach to receiving information back from
  744.         the user. Using the PromptIncomm or EntryIncomm is a good way to
  745.         gather a limited amount of data, PromptIncomm is most useful for
  746.         yes and no questions, and for amounts. EntryIncomm is good for
  747.         long replies (sentences, names, etc,...).
  748.            You can also vary Incomm in a number of ways, the Incomm routine
  749.         is the kernel for PromptIncomm and EntryIncomm. You can write your own
  750.         routine to first do your special prompt and then call Incomm. For
  751.         example, if you wanted to make a prompt that used RainbowSend so the
  752.         prompt is lots of different colors, you could do this:
  753.  
  754.         SUB RainbowInput(Text$, LimitField)
  755.            CALL RainbowSend(Text$, No, No, 11)
  756.            CALL Incomm("", No, LimitField, Last.Clr.Used)
  757.         END SUB
  758.  
  759.            This would be output Text$ (the prompt) using RainbowSend first,
  760.         then use Incomm to receive the data. The variable, Last.Clr.Used, is
  761.         a Door Source variable that has the number of the last color used
  762.         stored in it.
  763.            If you have specific keys that you want the user to use and to
  764.         lock out the others, use the Table$ and Default.Table$ to limit
  765.         the input to certain keys, for example:
  766.  
  767.            Table$="YN"
  768.            CALL Incomm("Do you want to quit (Y/N) ? ", No, 1, 14)
  769.            Table$=Default.Table$
  770.  
  771.            The above example first sets Table$ to equal YN, now Door Source
  772.         will only allow the user to input the letters Y and N (Lower case
  773.         will NOT work, you have to add in the lower case letters too!).
  774.         The last line sets Table$ back to the default (when Door Source
  775.         starts, Table$ is already at the default). This is very important
  776.         so that you don't accidentally keep limiting input when you don't
  777.         want to. Also, NEVER change Default.Table$, doing so will make it
  778.         only harder on you to undo the Table$ setting. You don't have to
  779.         worry about adding in characters like backspace or enter, because
  780.         Door Source assumes that you will want to let the user use those
  781.         keys. Table$ does not affect any output routines, only the Door
  782.         Source input routines (except CommInkey$ and CommKeyInkey$ functions)
  783.  
  784.   Door Source 4.0B
  785.   Programmer's Manual - Page 20
  786.  
  787.         Making friendly menus
  788.         ---------------------
  789.            Friendly menus (to you and the user) are menus that can be
  790.         aborted in the middle of display. To make a friendly menu in
  791.         Door Source, define a array and put your menu in it. This also
  792.         makes it easy for you to make a quick change to one or all of
  793.         your menus if you have all of the arrays in the same place.
  794.         An example of how to make a friendly menu would be:
  795.  
  796.         CONST Main.Menu.Length = 5
  797.  
  798.         DIM Main.Menu$(5)
  799.  
  800.         Main.Menu$(1)="(1) Quit"
  801.         Main.Menu$(2)="(2) Quit"
  802.         Main.Menu$(3)="(3) Quit"
  803.         Main.Menu$(4)="(4) Quit"
  804.         Main.Menu$(5)="(5) Quit"
  805.  
  806.         CALL BlockSend(Main.Menu$(), No, Main.Menu.Length)
  807.  
  808.            If the user was to press the space bar, CTRL-X, or CTRL-K while
  809.         the menu was displaying, it would stop displaying and let your
  810.         program go on to receive the input.
  811.            Another form of the friendly menu (but doesn't allow aborting)
  812.         is using MenuManager to display your menu, and allows ANSI users to
  813.         use a scroll bar to scroll up and down and make their choice, and
  814.         allows non-ANSI users to enter their selection.
  815.  
  816.         Presenting information in a compact format
  817.         ------------------------------------------
  818.            Displaying ten, twenty character long lines, on ten separate lines
  819.         is a waste of space. Instead, you could compact the display to five
  820.         lines, or even less. Setting TabSpace in between calls to one of the
  821.         Send routines will let you make a nicely formatted display, for example:
  822.  
  823.            CALL Send("Info #1:"+Info1$, No, No, 10)
  824.            TabSpace = 40
  825.            CALL Send("Info #2:"+Info2$, No, Yes, 10)
  826.            CALL Send("Info #3:"+Info3$, No, No, 10)
  827.            TabSpace = 40
  828.            CALL Send("Info #4:"+Info4$, No, Yes, 10)
  829.  
  830.         Would look like:
  831.  
  832.         Info #1: Something                      Info #2: Something else
  833.         Info #3: Anything                       Info #4: Anything else!
  834.  
  835.   Door Source 4.0B
  836.   Programmer's Manual - Page 21
  837.  
  838.            If you want to display information from an array in a compact
  839.         format, you could do this:
  840.  
  841.            Stack = 0
  842.            FOR X = 1 TO 10
  843.               IF Stack = 0 THEN
  844.                  CALL Send("Info :"+Info$(X), No, No, 10)
  845.                  TabSpace = 40
  846.                  Stack = 1
  847.               ELSE
  848.                  CALL Send("Info :"+Info$(X), No, Yes, 10)
  849.                  Stack = 0
  850.               END IF
  851.            NEXT X
  852.            IF TabSpace = 40 THEN TabSpace = 0
  853.  
  854.            In the above example, the variable Stack changes from 0 to 1 and
  855.         back again to keep track of whether or not it's time to tab over to
  856.         column 40 or to end the line. The IF after the NEXT X makes sure that
  857.         you aren't set at column 40 for your next output when you don't want
  858.         to be.
  859.            You could also put in another IF block inside the FOR loop to let
  860.         you decide whether or not you have any information to display or not.
  861.         You could also modify all the above examples so that you could have
  862.         three columns and not just two.
  863.  
  864.         The Configuration File
  865.         ----------------------
  866.            You can make the configuration file for your door program larger
  867.         than what Door Source requires it to be, and you can read in the
  868.         information yourself too. Door Source automatically reads in the
  869.         first four lines of the configuration file and sets everything up
  870.         for you to read the rest. Reading more from the configuration file
  871.         is simple:
  872.  
  873.         ' $INCLUDE:'DOORSORC.INT'
  874.         ProgName$="Configuration Reader"
  875.         Release$="1.0"
  876.         LINE INPUT #1, ExtraInfo$
  877.         LINE INPUT #1, ExtraNumber
  878.         CLOSE #1
  879.         CALL ClrScrn
  880.  
  881.            Even though there is no open statement, Door Source opened the
  882.         file and read the information from it already (It did this from in
  883.         the DOORSORC.INT). Remember to close the file after use, even if you
  884.         don't use it at all. The only limit to how long your configuration
  885.         file can be is the disk space and the amount of memory you can
  886.         use to store the information. The configuration file can not be
  887.         in a random access format, only sequential.
  888.   Door Source 4.0B
  889.   Programmer's Manual - Page 22
  890.  
  891.         Testing your Door
  892.         -----------------
  893.            The easiest way to test your door is to run it from inside the
  894.         Quick Basic environment. You first have to have three things done
  895.         so that you can, and they are:
  896.  
  897.                 1) Have a sample configuration file in the Quick Basic
  898.                    directory.
  899.  
  900.                 2) Load Quick Basic with the /L option and DS40 after it
  901.                    For example:
  902.                         QB /L DS40 /CMDTESTDOOR.CFG LOCAL
  903.  
  904.                 3) Load Quick Basic with the /CMD option and your configuration
  905.                    file's name after it with the word LOCAL.
  906.                    (See above example)
  907.  
  908.            If you forgot to load with the /CMD option, you can set it from
  909.         inside Quick Basic from the Run menu (Modify COMMAND$).
  910.            Now all you have to do is press F5 to run your program. If you
  911.         have any problems, refer to Appendix C - Common Questions.
  912.  
  913.   Door Source 4.0B
  914.   Programmer's Manual - Page 23
  915.  
  916.         Finishing your Door
  917.         -------------------
  918.            To eliminate all possible problems, you should first thoroughly test
  919.         you door in two manners, logically, and unlogically. When you are
  920.         logically testing it, you should use your door the way you designed
  921.         it to be used, noting the little problems as you go. Then when you
  922.         unlogically test it, you try testing your program in a way completely
  923.         opposite of how you designed it. This method is a through method to
  924.         debug your program. You will find most of the errors through this
  925.         method, but then there are always situations that even you didn't
  926.         think of in either of these manners.
  927.            To finish a door you will need to compile to door into a EXE format.
  928.         This way you can use the door without having to load QuickBasic to run
  929.         your doors. Since Door Source doesn't use Quick Basic's communications
  930.         routines, you CAN compile your door to be a stand-alone program, that
  931.         doesn't need BRUN45.EXE. If you prefer to not make it a stand-alone,
  932.         you do not have to use a patched version of BRUN45.EXE like other
  933.         door packages require.
  934.            In order to compile your program, you must go to the Run menu and
  935.         select Make EXE. It will compile your program in memory and then
  936.         a window will pop up asking what you want the final file name of the
  937.         program to be, and other options. Do not select the produce debug
  938.         code option, it will only make your program larger and slower, and
  939.         allow people to break it in the middle by pressing CTRL-Break. After
  940.         you have everything like you want it, select one of the button on the
  941.         bottom of the window to start the process.
  942.            Of course, you'll need to provide some documentation for your
  943.         door, and good documentation should have some of these sections listed
  944.         here:
  945.                 Table of contents
  946.                 Disclaimer
  947.                 Overview/Summary of the door
  948.                 List of files in archive
  949.                 Configuration file setup
  950.                 Command line options
  951.                 Batch file setup
  952.                 Customization instructions
  953.                 List of function/ALT keys
  954.                 Possible errors/Troubleshooting
  955.  
  956.            A good disclaimer is always something that is hard to come by, here
  957.         is a disclaimer that pretty much covers you:
  958.  
  959.                 This program and other files associated with it are not
  960.                 guaranteed to be bug free or virus free. We are not
  961.                 responsible for any damages of any kind, including
  962.                 profit loses and data loss, that relate directly or
  963.                 indirectly to these programs and files. You may
  964.                 distribute this program, as long as it is in unmodified
  965.                 form with all the files originally included.
  966.   Door Source 4.0B
  967.   Programmer's Manual - Page 24
  968.  
  969.            You may wish to add/change/delete something from this one, but it
  970.         is a pretty good one. A overview or summary of the door would be a
  971.         simple explanation of exactly what your door does, no specifics
  972.         really. The configuration file section should show a sample
  973.         configuration file, and give a sentence or two on each line in the
  974.         file. The command line options should show the user how to
  975.         configure the door to run with his system. Refer to the chapter
  976.         on command line options to put into your documentation.
  977.            The batch file setup should show a few example batch files, and
  978.         telling you if you need to add it in your daily event, etc,...
  979.         The customization section should tell the sysop that uses your door
  980.         how to better customize it to what he needs. Some examples might be
  981.         aliases allowed/not allowed, location of files, prompts, etc,...
  982.            The list of function keys is basically this:
  983.  
  984.                   F3  - Printer toggle
  985.                   F4  - Page bell toggle
  986.                   F5  - Shell to DOS
  987.                   F7  - Caller alarm toggle
  988.                   F8  - Return caller to board
  989.                   F10 - Start sysop chat
  990.                   ESC - Enter sysop chat
  991.                 ALT-X - Drop to DOS after caller logs off
  992.                 ALT-N - Sysop next on flag
  993.  
  994.            Troubleshooting should list a few possible errors that might
  995.         occur, and how to solve them. Like if error number 53 (File not found)
  996.         occurs, then search your configuration file for a misspelled filename
  997.         or a wrong path. If error 61 (Disk full) occurs, free up disk space.
  998.         Some errors can't be solved, and you could list those and have them
  999.         call a bulletin board for more help.
  1000.  
  1001.   Door Source 4.0B
  1002.   Programmer's Manual - Page 25
  1003.  
  1004.         Getting more out of Door Source
  1005.         -------------------------------
  1006.  
  1007.         This section and the following section, Advanced Techniques, are
  1008.         very closely related. With Door Source 4.0B, it is basically possible
  1009.         for you to write your own input and output routines using out base
  1010.         routines to do the dirty work. The difference in between this section
  1011.         and the next is simply that this tells you how to take advantage of
  1012.         some of the new variables and features, and the next section tells
  1013.         you more on programming more advanced things with Door Source.
  1014.  
  1015.         The definable page sound
  1016.         ------------------------
  1017.  
  1018.            You can easily change the sound of the SysopPage routine by
  1019.         setting 3 variables - PageSound.1, PageSound.2, and PageSound.3
  1020.         The sound generated is in the order of PageSound.1, then PageSound.2,
  1021.         and then the final sound is PageSound.3. The numbers you put in
  1022.         PageSound should be in the acceptable range of the SOUND command,
  1023.         which is somewhere around 45-32767. A page sound of 200, 400, 600
  1024.         would make a sound that starts out low, then the next sound is
  1025.         about double the pitch of the first, and the third is double the
  1026.         pitch of the second. Its possible to create a variety of different
  1027.         sounds with this, try experimenting with the SOUND command first to
  1028.         find what you like the best. The duration of the sounds is set, and
  1029.         can't be changed.
  1030.                 Example:
  1031.                 PageSound.1=200
  1032.                 PageSound.2=400
  1033.                 PageSound.3=600
  1034.                 CALL SysopPage(Answered)
  1035.  
  1036.         Filtering your input
  1037.         --------------------
  1038.  
  1039.            Sometimes, you may want to limit the input to a question to a
  1040.         few letters, or selectively not recognize certain characters. To
  1041.         do so, you should set the Table$ variable. An example would be:
  1042.                 Example:
  1043.                 Table$ = "YNyn"
  1044.                 CALL Incomm("You can only type Y and N:",No,1,15)
  1045.                 ' Anything else besides Y,N,y,n that the user types is
  1046.                 ' not displayed or recognized. Backspace and enter CAN NOT
  1047.                 ' be filtered out.
  1048.                 Table$ = Default.Table$
  1049.                 ' This is necessary to reset the filter back to normal,
  1050.                 ' if you didn't do this then you'll have problems with
  1051.                 ' later Incomm commands still being restricted with the
  1052.                 ' filtering.
  1053.                 Output:
  1054.                 You can only type Y and N:Y   Door Source 4.0B
  1055.   Programmer's Manual - Page 26
  1056.  
  1057.         Protecting input from prying eyes
  1058.         ---------------------------------
  1059.  
  1060.            When a password or something secret needs to be concealed, you
  1061.         can now set a "substitution character" that will be displayed in
  1062.         place of what the user really types. You can make the character
  1063.         anything you wish, but making it a null turns it off.
  1064.                 Example:
  1065.                 Protected.Input$="*" ' Now shows a * in place of text
  1066.                 CALL Incomm("Password:", No, No, 15)
  1067.                 Protected.Input$=""  ' Turns it off - Back to normal display
  1068.                 Output:
  1069.                 Password:******
  1070.  
  1071.         Two fancier input prompts
  1072.         -------------------------
  1073.  
  1074.            EntryIncomm
  1075.            -----------
  1076.            EntryIncomm prints out a field of (----) above the area where
  1077.            the user's input will be displayed. The size of the field is based
  1078.            on how big you make the field. Good for ANSI and NON-ANSI!
  1079.                 Example:
  1080.                 CALL EntryIncomm("Your new name:", 25, LightGreen, Yellow)
  1081.                 '                                  ^ Field size
  1082.                 Output:
  1083.                              (-------------------------)
  1084.                 Your new name:Zantigahicatal
  1085.  
  1086.            PromptIncomm
  1087.            ------------
  1088.            PromptIncomm is most useful in ANSI cases, but will handle
  1089.            non-ansi well too, but the purpose of the routine is defeated
  1090.            then. What it does is create a field similar to the EntryIncomm
  1091.            but the field is on the same line as the input. The second text
  1092.            field is the "default field" tells the user what it defaults to
  1093.            if they press enter, but its up to you to interpret them pressing
  1094.            enter. You can pass a string as the second parameter, and it
  1095.            will use that instead of one of the already programmed constants.
  1096.            The constants are:
  1097.                 Default1 = (Enter=no)
  1098.                 Default2 = (Enter=none)
  1099.                 Default3 = (Enter=quits)
  1100.  
  1101.                 Example:
  1102.                 CALL PromptIncomm("Do you wish to quit",Default1,
  1103.                         LightGreen, 1, Yellow)
  1104.                 '                   ^ Field size
  1105.                 Output:
  1106.                 Do you wish to quit (Enter=no) ? (N)   Door Source 4.0B
  1107.   Programmer's Manual - Page 27
  1108.  
  1109.            Unabortable ViewFiles
  1110.            ---------------------
  1111.            Do you want to force the user to see out an entire file? Its easy
  1112.            to block the abort codes by setting the variable No.Abort to YES,
  1113.            then when the user tries to abort, it won't let him. However, if
  1114.            more prompts are still offered, answering NO to it will stop the
  1115.            display.
  1116.                 Example:
  1117.                 No.Abort = YES
  1118.                 CALL ViewFile("MYFILE.ANS", No, No, No)
  1119.                 No.Abort = NO   ' Reset it back to normal
  1120.  
  1121.            Disabling carrier checking
  1122.            --------------------------
  1123.            How would you like to turn off carrier checking for a
  1124.            call back verification program of some sort, or something
  1125.            along those lines? Try setting Carrier.Check to YES, and
  1126.            Door Source will *IGNORE* the carrier detect flag. If the
  1127.            user drops carrier, you'll have to handle and detect yourself!
  1128.                 Example:
  1129.                 Carrier.Check = No  ' Disables carrier checking
  1130.                 Carrier.Check = Yes ' (Default) enables carrier checking
  1131.  
  1132.            Checking the baud and the carrier, setting DTR, CTS, and RTS
  1133.            ------------------------------------------------------------
  1134.  
  1135.               Checking the baud rate
  1136.               ----------------------
  1137.               The variable Baud& has the baud rate stored in it. Here's
  1138.               what the number in it means:
  1139.                         1       - Local mode
  1140.                         300     - 300 baud
  1141.                         1200    - 1200 baud
  1142.                         2400    - 2400 baud
  1143.                         4800    - 4800 baud
  1144.                         9600    - 9600 baud
  1145.                         19200   - 19,200 baud
  1146.                         38400   - 38,400 baud
  1147.                         115200  - 115,200 baud
  1148.  
  1149.               Since some boards run with their modem locked, Door Source
  1150.               will give you the locked baud rate in Baud&, but the true
  1151.               connect speed is in TrueBaud&
  1152.  
  1153.               Checking the carrier
  1154.               --------------------
  1155.               The routine CheckCarrier will tell you if a carrier is
  1156.               present.
  1157.                 Example:
  1158.                 CALL CheckCarrier(CarrierFlag)
  1159.                 IF CarrierFlag = NO AND Baud& > 1 THEN
  1160.                    CALL ExitDoor  ' Carrier lost!
  1161.                 END IF
  1162.  
  1163.   Door Source 4.0B
  1164.   Programmer's Manual - Page 28
  1165.  
  1166.               Setting the DTR, CTS, and RTS
  1167.               -----------------------------
  1168.  
  1169.                 DTR
  1170.                 ---
  1171.                 The DTR (Data Terminal Ready) when on normally means that
  1172.                 you are on-line, and have a connection. However, on most
  1173.                 modems, turning it off while it is on will break the
  1174.                 connection.
  1175.                         Example:
  1176.                         CALL ChangeDTR(YES)   ' Turn DTR on
  1177.                         CALL ChangeDTR(NO)    ' Turn DTR off
  1178.  
  1179.                 CTS Control On/Off
  1180.                 ------------------
  1181.                 CTS (Clear To Send) is used to signal the other modem that
  1182.                 it is ok to send characters. Modems that don't preform
  1183.                 error checking or UARTS that don't have buffers may require
  1184.                 CTS flow-control to be on during high-speed file transfers.
  1185.                         Example:
  1186.                         CALL ChangeCTS(YES)   ' Turn CTS control on
  1187.                         CALL ChangeCTS(NO)    ' Turn CTS control off
  1188.  
  1189.                 RTS
  1190.                 ---
  1191.                 RTS (Request To Send) is used by most auto-dial modems to
  1192.                 see if a computer is ready to receive data from the modem.
  1193.                 If the RTS signal isn't detected, some modems may refuse
  1194.                 to accept modem commands or send result codes.
  1195.                         Example:
  1196.                         CALL ChangeRTS(YES)   ' Turn RTS on
  1197.                         CALL ChangeRTS(NO)    ' Turn RTS off
  1198.  
  1199.            Automatic more prompts
  1200.            ----------------------
  1201.            If you're displaying lots of information, like programmed in
  1202.            documentation, and you don't want to keep track of when you
  1203.            need to show a more prompt or a press any key prompt, just
  1204.            simply set the AutoMore variable to one of the settings:
  1205.                 0                              Disables the prompts (default)
  1206.                 MorePrompt    (Or the value 1) Causes automatic more prompts
  1207.                 PressKeyPromp (Or the value 2) Causes automatic press any key
  1208.                 Example:
  1209.                     AutoMore = MorePrompt
  1210.            The variable Lines.Since will tell you how many lines have been
  1211.            sent SINCE the last ClrScrn WITH one of the Send routines or
  1212.            Incomm routines. The automatic prompts are by default not
  1213.            enabled, and when enabled, they occur every 23 lines.
  1214.  
  1215.   Door Source 4.0B
  1216.   Programmer's Manual - Page 29
  1217.  
  1218.         Advanced Techniques
  1219.         -------------------
  1220.            Door Source has several new features that are more program
  1221.         related, that are just a little bit to hard to put in the previous
  1222.         section, Getting more out of Door Source.
  1223.  
  1224.            The extra line status line
  1225.            --------------------------
  1226.            Normally, Door Source has lines 24 and 25 in use with its status
  1227.            line, but if you have some information of you're own that you'd
  1228.            like to put on it, now you can by using the GameInfoUpdate
  1229.            routine with the variable GameInfoCol.
  1230.            The only major change you have to make to your program is to use
  1231.            the DSGAME.INT file instead of the DOORSORC.INT file, and you'll
  1232.            need to write a routine to do the status line updating.
  1233.            First of all, the Door Source status line is moved up to lines
  1234.            23 and 24, and we leave 25 for your use. You call the
  1235.            GameInfoUpdate routine like you would call print, for example:
  1236.                 ' $INCLUDE:'DSGAME.INT'
  1237.                   .
  1238.                   .  (Later in the program)                         Background
  1239.                   .                                                     \/
  1240.                 CALL GameInfoUpdate("This is on the 25th line!", No, 14, 7)
  1241.                                      ^ Text                      ^   ^
  1242.                                                                  |   Foreground
  1243.                                                                  Enter
  1244.            The background is the last number, and the color you specify is
  1245.            the foreground color. The enter parameter is like the ; on a
  1246.            print command, telling it no keeps the current position at that
  1247.            spot, but yes will start at column 1 when you do the next
  1248.            GameInfoUpdate.
  1249.            But what if you want to position the cursor somewhere on the
  1250.            line without printing to that location? Or what if you want
  1251.            to know where the cursor is? You can tell both of these by
  1252.            looking at the GameInfoCol variable. For example:
  1253.                 A = GameInfoCol   ' A now contains the horizontal position
  1254.                                   ' of the cursor on line 25.
  1255.                 GameInfoCol = 30  ' With the next GameInfoUpdate call, it
  1256.                                   ' will start printing at column 30.
  1257.            Now the only thing missing is your interfacing this into your
  1258.            program. The easiest way to do this is to write a new ClrScrn
  1259.            routine, that you call in place of ClrScrn, this is necessary
  1260.            because ClrScrn doesn't update your line when called, so you'll
  1261.            have to do it. Here's an example of a new ClrScrn:
  1262.               SUB ClearTheScreen
  1263.                  CALL ClrScrn
  1264.                  CALL GameInfoUpdate("This is on the 25th line!",No,14,7)
  1265.               END SUB
  1266.  
  1267.   Door Source 4.0B
  1268.   Programmer's Manual - Page 30
  1269.  
  1270.            Writing your own output routines
  1271.            --------------------------------
  1272.               With Door Source, you can virtually write your own output
  1273.            routines for use with your program. The kernel for all of our
  1274.            output routines is the Send1Line routine. It will send one
  1275.            line out to the local and remote display, and will decode the
  1276.            substitution codes too! All that's left for you to do is to
  1277.            write your own routine that calls this routine. For example,
  1278.            say you wanted to write a routine that would colorize all of the
  1279.            letters that are the capital A, then you might do this:
  1280.               SUB ColorizeTheA(Text$,AColor$,RegularColor$)
  1281.                  FOR X=1 TO LEN(Text$)
  1282.                     IF MID$(Text$,X,1)="A" THEN
  1283.                        CALL Send1Line(AColor$+MID$(Text$,X,1))
  1284.                     ELSE
  1285.                        CALL Send1Line(RegularColor$+MID$(Text$,X,1))
  1286.                     END IF
  1287.                  NEXT X
  1288.               END SUB
  1289.            The variables AColor$ and RegularColor$ would store the @X color
  1290.            codes for the colors for A's and other letters.
  1291.  
  1292.            Writing your own input routines
  1293.            -------------------------------
  1294.               You can write your own input routines too with Door Source.
  1295.            The main kernel for the input routine is CommInkey$, and a few
  1296.            other routines supplement the features offered in Incomm. An
  1297.            example input routine that is very simple might be:
  1298.               SUB GetInput
  1299.                  DO
  1300.                     A$=CommInkey$
  1301.                     IF A$="" THEN A$=INKEY$
  1302.                  LOOP UNTIL A$<>""
  1303.                  ARG$=A$
  1304.               END SUB
  1305.            You should also be aware that all filters, and special variables
  1306.            that affect input with Incomm do NOT work with CommInkey$, you
  1307.            have to program in support for them yourself if you want them.
  1308.            The GetInput routine above would wait for a key to be pressed
  1309.            on the local or remote keyboard. Now say that you want to echo
  1310.            the character to the screen and to the remote screen, you'd do
  1311.            this:
  1312.               SUB GetInput
  1313.                  DO
  1314.                     A$=CommInkey$
  1315.                     IF A$="" THEN A$=INKEY$
  1316.                  LOOP UNTIL A$<>""
  1317.                  ARG$=A$
  1318.                  CALL Send1Line(A$)   ' Echos the character
  1319.               END SUB
  1320.   Door Source 4.0B
  1321.   Programmer's Manual - Page 31
  1322.  
  1323.            Now maybe you want to trap the function keys, you could do this:
  1324.               SUB GetInput
  1325.                  DO
  1326.                     A$=CommInkey$
  1327.                     IF A$="" THEN A$=INKEY$
  1328.                  LOOP UNTIL A$<>""
  1329.                  ARG$=A$
  1330.                  IF LEFT$(A$,1)=CHR$(0) THEN
  1331.                     CALL ExtendedCode(A$,NULL) ' Process the function key
  1332.                  ELSE
  1333.                     CALL Send1Line(A$)         ' Echos the character
  1334.                  END IF
  1335.               END SUB
  1336.            The NULL variable on the ExtendedCode is used only by Incomm,
  1337.            and you shouldn't pass anything to it in place of it, and its
  1338.            not used to return anything to your program. Now the GetInput
  1339.            routine we have above is pretty good. It will accept input
  1340.            from the keyboard and from remote, check for a extended code
  1341.            and process it, otherwise it will echo the character.
  1342.            You can also write your own chat routine, but use our code
  1343.            by calling Incomm with the second parameter as a 5. This
  1344.            will print the "Sysop started chat at" and the "Hello, this is"
  1345.            lines, and then will handle the input and color for you, then
  1346.            once the sysop presses ESC to end the chat, it will print the
  1347.            "Sysop ended chat at" and return control to you. So basically, by
  1348.            passing a 5 as the second parameter forces a chat.
  1349.               Example:
  1350.               CALL Incomm("",5,No,15)   ' Forces a chat
  1351.  
  1352.            Carrier loss processing
  1353.            ----------------------
  1354.               Sometimes in more complex doors, its necessary to process
  1355.            a carrier drop yourself in order to save and wrap up files.
  1356.            You could turn carrier checking off, but its best if you use
  1357.            the CarrierLossError method. What you do is set CarrierLossError
  1358.            to YES and when carrier is dropped, a error number 255 will be
  1359.            forced, and if you have a ON ERROR trapping processing in your
  1360.            program, you will be able to catch it, and then let Door Source
  1361.            finish off the rest. For an example, please refer to the example
  1362.            program ERRDEMO.BAS.
  1363.  
  1364.   Door Source 4.0B
  1365.   Programmer's Manual - Page 32
  1366.  
  1367.         How a door works
  1368.         ----------------
  1369.            Understanding how a door works is good to know so that you can
  1370.         better plan your door. Here's a simple diagram on what happens:
  1371.  
  1372.                         BBS Creates the interface file and exits
  1373.                                          \|/
  1374.                                 Door's batch file is run
  1375.                                          \|/
  1376.              |-->      Door loads and reads in the interface file
  1377.              |                           \|/
  1378. Door Source  |      The door opens the communications port if needed
  1379. handles this |                           \|/
  1380. with your    |                 User interacts with the door
  1381. program      |                           \|/
  1382.              |-->  Door eventually exits, updating the interface file
  1383.                                          \|/
  1384.                        BBS reloads and reads in the interface file
  1385.                                          \|/
  1386.                               User continues using the bbs
  1387.  
  1388.         The DOORSORC.INT file sets up the necessary DECLAREs for the routines
  1389.         and the functions, it then sets up the COMMON SHARED block which lets
  1390.         you share variables with Door Source, like Baud&. Then it sets up
  1391.         a few constants, and then calls InitDoor, then the Door Source library
  1392.         takes over, and reads the configuration file, initialize its variables
  1393.         and then opens the com port for access. Then control is returned to
  1394.         you and your program picks up from their setting the program's name
  1395.         and version, etc,... While you're doing other processing, Door Source
  1396.         is ALWAYS looking at the com port, keeping received data in its
  1397.         buffer until you're ready for it. Door Source monitors everything
  1398.         for you, from carrier detection to characters being sent to
  1399.         characters being received, all behind the scenes.
  1400.  
  1401.   Door Source 4.0B
  1402.   Programmer's Manual - Page 33
  1403.  
  1404.         Converting from Door Source 3.2 or before to 4.0
  1405.         ------------------------------------------------
  1406.            There are a few changes in how you call routines from 3.2 and
  1407.         before. Here's the list and how to change your program to fit 4.0
  1408.         without major restructuring. The easiest way to change things is
  1409.         using the QuickBasic search and replace feature from the edit menu.
  1410.  
  1411.          * Routine AllTrun is now a function, you use it like this:
  1412.                 A$ = AllTrun$(A$)
  1413.          * Routine HighScores has a extra parameter. The new third parameter
  1414.            lets you output its output to a already open file by passing the
  1415.            file number, but if you pass a 0, it outputs to the screen.
  1416.                 CALL HighScores(Score, ScoreDataFile$, OutputFileNumber)
  1417.          * Routine Windows has a few parameters changes, the text foreground
  1418.            and text background have been deleted since WindowPrint and
  1419.            WindowInput do all window processing. Windows in your program
  1420.            will need to be re-written because of this.
  1421.                 CALL Windows(ULR, ULC, LRR, LRC, Foreground, Background,
  1422.                         Border, Shadow)
  1423.          * Routine Windows has two new borders, they are:
  1424.                 3 - Double horizontal Single vertical
  1425.                 4 - Single horizontal Double vertical
  1426.  
  1427.          * Routine DayOfWeek moved into ScriptCMD.
  1428.                 I1$="DAYOFWEEK":CALL ScriptCMD
  1429.          * Routine MenuManager parameters have been changed, the Select$
  1430.            parameter has been deleted, since now ANSI.Select$ and
  1431.            NonANSI.Select$ (COMMON SHARED variables) are now used for the
  1432.            select string. BarForeground and BarBack have been added, they
  1433.            have the foreground and background color for the selection bar.
  1434.                 CALL MenuManager(Menu$(),Center,TextColor,NumberOfSelections,
  1435.                    BarForeground, BarBackground, BarnumberSelected)
  1436.          * Routine SysopPage now has an extra parameter, this extra one is
  1437.            used to return a variable in, not to pass one. It returns a 1 (YES)
  1438.            if the page was answered.
  1439.                 CALL SysopPage(Answered)
  1440.          * Routine ErrorLevelSet has been removed because of environment
  1441.            conflicts.
  1442.  
  1443.   Door Source 4.0B
  1444.   Programmer's Manual - Page 34
  1445.  
  1446.         Summary of new features
  1447.         -----------------------
  1448.                 LOCAL command line switch added
  1449.                 NETWORK command line switch added
  1450.                 Up.Key$ and Down.Key$ variables added
  1451.                 SysopPage changed
  1452.                 PageSound.1, PageSound.2, and PageSound.3 added
  1453.                 Page.String$ added
  1454.                 F5 (Shell to DOS) added
  1455.                 F3 (Printer toggle) added
  1456.                 GameInfoUpdate routine added
  1457.                 GameInfoCol added
  1458.                 Table$ and Default.Table$ added
  1459.                 PromptIncomm routine added
  1460.                 No.Abort added
  1461.                 MenuManager changed
  1462.                 Parser changed
  1463.                 WindowPrint and WindowInput routines added
  1464.                 ExtendedCode routine added
  1465.                 Protected.Input$ added
  1466.                 BlockSend routine added
  1467.                 RainbowSend routine added
  1468.                 Windows routine changed
  1469.                 DayOfWeek routine moved into ScriptCMD
  1470.                 RandNum function fixed
  1471.                 EntryIncomm added
  1472.                 AllTrun routine changed into a function
  1473.                 CheckCarrier routine added
  1474.                 Baud& variable added
  1475.                 CarrierLossError added
  1476.                 Carrier.Check added
  1477.                 ChangeDTR, ChangeCTS, and ChangeRTS added
  1478.                 IRQ command line parameter added
  1479.                 ADDR command line parameter added
  1480.                 PS2 command line parameter added
  1481.                 HighScores changed
  1482.                 ALL ROUTINES optimized to run faster, and to be more compact
  1483.  
  1484.   Door Source 4.0B
  1485.   Programmer's Manual - Page 35
  1486.  
  1487.         Appendix A - CALL Syntax
  1488.         ------------------------
  1489.  
  1490.         CALL QSend(Text$, Enter)
  1491.         CALL BackSpace(Text$)
  1492.         CALL ExtendedCode(Text$,NULL)
  1493.         CALL BeepSpeaker()
  1494.         CALL NL(Number.Of.Lines)
  1495.         CALL Send(Text$, Bell, Enter, Color.To.Use)
  1496.         CALL Incomm(Text$, Enter, Limit.Field, Color.To.Use)
  1497.         CALL ANSIMusic(Music$, Music)
  1498.         CALL GameInfoUpdate(Text$, Enter, Color.To.Use, Color.Background)
  1499.         CALL BackSpaceOver()
  1500.         CALL Center(Text$)
  1501.         CALL ClrScrn
  1502.         CALL ColorEasy(Text$, Color.To.Use, Enter)
  1503.         CALL DoorBusy()
  1504.         CALL ErrorLevelSet(Error.Level)
  1505.         CALL ExitDoor()
  1506.         CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  1507.         CALL HighScores(Score, Score.FileName$, OutputFileNumber)
  1508.         CALL MenuManager(Menu$(), Center, TextColor, Number.Of.Bars,
  1509.            Select.Color, BarForeground, BarBackground, BarSelected)
  1510.         CALL MoveCursor(X,Y)
  1511.         CALL Parser(SearchFor$, SearchIn$, Array$(), ErrCode)
  1512.         CALL ReadUsers(ErrCode)
  1513.         CALL ScriptCMD()
  1514.         CALL Sorter(Array$(), How.Many.Elements)
  1515.         CALL SysopPage(Answered)
  1516.         CALL TimeConvert(Hours, Minutes, New.Time$)
  1517.         CALL ViewFile(FileName$, Check.For.GFile, MorePrompts, EnterPrompt)
  1518.         CALL WaitASec(How.Many.Seconds.To.Wait)
  1519.         CALL Windows(ULR, ULC, LRR, LRC, Fore, Back, Border, Shadow)
  1520.         CALL WriteUsers(ErrCode)
  1521.         CALL BlockSend(Array$(), Center, Lines.To.Send)
  1522.         CALL WindowPrint(Text$, Row, Col, Fore, Back)
  1523.         CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  1524.         CALL RainbowSend(Text$, Bell, Enter, Color.To.Use)
  1525.         CALL PromptIncomm(Text$, Default$, DefaultColor, LimitField,
  1526.            Color.To.Use)
  1527.         CALL EntryIncomm(Text$, LimitField, FieldColor, Color.To.Use)
  1528.         CALL ShellToDos(Shell.String$)
  1529.  
  1530.   Door Source 4.0B
  1531.   Programmer's Manual - Page 36
  1532.  
  1533.         Appendix B - Optimizing your door
  1534.         ---------------------------------
  1535.            The best way to optimize a door program can be divided into two
  1536.         parts.
  1537.                 1) The first part is cleaning up your code. This would mean
  1538.                    elimination of most or all GOTOs and GOSUBs, elimination
  1539.                    of as many constants as possible, and elimination of
  1540.                    repetition in your code.
  1541.                 2) The second part is compiling from the command line.
  1542.                    QuickBasic compiles with some unneeded options when you
  1543.                    select the Make EXE command from the Run menu. You might
  1544.                    need the error trapping flag (/X) if you have a ON ERROR
  1545.                    statement in your program, and you might need the switch
  1546.                    for dynamic arrays (/AH) if you're using them. Here's a
  1547.                    sample compilation for a NON-STANDALONE program:
  1548.                       BC MYPROG;
  1549.                       LINK /EX MYPROG.BAS,MYPROG.EXE,,BRUN45.LIB+DOORSORC.LIB
  1550.  
  1551.                    For a STANDALONE program, use this:
  1552.                       BC MYPROG/O;
  1553.                       LINK /EX MYPROG.BAS,MYPROG.EXE,,BCOM45.LIB+DOORSORC.LIB
  1554.  
  1555.                    These parameters will compile the to the most compact
  1556.                    format. You can also use PKLITE to compress it more.
  1557.  
  1558.   Door Source 4.0B
  1559.   Programmer's Manual - Page 37
  1560.  
  1561.         Appendix C - Common Questions
  1562.         -----------------------------
  1563.         Q: How do I read in additional information from the configuration
  1564.            file?
  1565.         A: To read in more information, simply INPUT from file #1 after you
  1566.            call ClrScrn for the first time. Make sure to close it when you're
  1567.            done. Here's an example:
  1568.               ' $INCLUDE:'DOORSORC.INT'
  1569.               PROGNAME$="Example"
  1570.               RELEASE$="1.0"
  1571.               CALL ClrScrn
  1572.               INPUT #1, ExtraInfo
  1573.               CLOSE #1
  1574.            Door Source doesn't read past the fourth line of the configuration
  1575.            file, so you can put whatever you please there.
  1576.         Q: How do I test a door from inside QuickBasic?
  1577.         A: You must have first loaded QuickBasic with the /L option specifying
  1578.            the Door Source library. For example:
  1579.               QB MYDOOR /L DOORSORC
  1580.            Then you will need to setup the command line parameters by setting
  1581.            the COMMAND$, you do this from the Run menu from Modify COMMAND$.
  1582.            Now, as long as your configuration file, bbs interface file, and
  1583.            all other files you need exist, you can press F5 and test your door
  1584.            from QuickBasic.
  1585.         Q: Should I compile as a stand-alone door?
  1586.         A: It's up to you. A stand-alone door will not need the BRUN45.EXE,
  1587.            but it will make your door significantly larger, and compiling
  1588.            not as a stand-alone will save space. Door Source will work fine
  1589.            either way.
  1590.         Q: What does the error "Error opening port -1" mean?
  1591.         A: It means that you have specified a invalid serial port, and you
  1592.            should check your bbs interface file or your bbs's setup.
  1593.  
  1594.   Door Source 4.0B
  1595.   Programmer's Manual - Page 38
  1596.  
  1597.         Appendix D - Variable Reference
  1598.         -------------------------------
  1599.         The first part of this reference is of the global variables, the
  1600.         second is of the global UserBlock type declaration.
  1601.  
  1602.         Variable Name   Purpose
  1603.         -------------   ------------------------------------------------------
  1604.         ARG$            Input from user, returned by Incomm routine
  1605.         SYSDPATH$       Drive/Path/Filename of bbs interface file
  1606.         BBSName$        Name of BBS running on
  1607.         SysopNM$        Sysop FULL name
  1608.         CALLNAME$       Caller's FULL name
  1609.         TrueBaud&       True baud rate of the caller
  1610.         Baud&           Baud rate of caller
  1611.         PROGNAME$       Name of your door
  1612.         RELEASE$        Version of your door
  1613.         ANSI            Ansi Flag  (1 = On  0 = Off)
  1614.         I1$,I2$,I3$     Input variables to script commands
  1615.         O1$,O2$,O3$     Output variables from script commands
  1616.         User.Color      Color that user input will be display in
  1617.         BackGroundColor Color to use for background when displaying
  1618.         Exit.Dor.1$     First line of ExitDoor message
  1619.         Exit.Dor.2$     Second line of ExitDoor message
  1620.         Exit.Dor.Clr1   Color of first line
  1621.         Exit.Dor.Clr2   Color of second line
  1622.         UserF$          First name of caller
  1623.         UserL$          Last name of caller
  1624.         Caps            Convert all input to caps (1 = Yes  0 = No)
  1625.         Page.Bell       Page bell toggle (-1 = On  0 = Off)
  1626.         Caller.Alarm    Caller alarm (-1 = On  0 = Off)
  1627.         Sysop.Next      Sysop next on toggle (-1 = On  0 = Off)
  1628.         Hang.Up         Exit to DOS after log off toggle (-1 = On  0 = Off)
  1629.         User.Record     Record number of user
  1630.         Network         Network active (1 = Yes  0 = No)
  1631.         Display.Toggle  Display on/off toggle (ignored by DS -1 = On  0 = Off)
  1632.         Printer.Toggle  Printer on/off (-1 = On  0 = Off)
  1633.         BusyFlag        A signal to ExitDoor that DoorBusy routine is in use
  1634.         UserFile$       Drive/Path/Filename of USERS file (PCBoard ONLY!)
  1635.         Up.Key$         Key to be used for scrolling up in MenuManager
  1636.         Down.Key$       Key to be used for scrolling down in MenuManager
  1637.         Parity          Parity of user calling (7 or 8 data bits)
  1638.         Filter          Incomm filtering active (filters all high ascii out)
  1639.         BusyFile$       Drive/Path/Filename of busy file for DoorBusy routine
  1640.         SysFirst$       Sysop's first name
  1641.         SysLast$        Sysop's last name
  1642.         CommPort        Communacations port being used (1-8)
  1643.         Last.Clr.Used   Last color used in a call to Send
  1644.         EchoKey         STOPS echoing keys to remote user (1 = Yes  0 = No)
  1645.         No.Enter.Send   Incomm doesn't send enter when done (1 = Yes  0 = No)
  1646.         File.Missing$   String ViewFile$ displays when file is not found   Door Source 4.0B
  1647.   Programmer's Manual - Page 39
  1648.  
  1649.         BBSType$        Type of BBS in use (PCB14, PCB121, PCB122, WILDCAT,
  1650.                         RBBS, or DOORSYS)
  1651.         Node            Node caller is on (works on with PCBoard systems)
  1652.         TabSpace        Send will tab to this column before sending
  1653.         InverseText     Reverses the text colors (Foreground/Background switch)
  1654.         Sysop           Sysop is on (1 = Yes  0 = No)
  1655.         BlinkText       Send will make text blink
  1656.         Not.Around$     String to show when Sysop doesn't answer page
  1657.         PARAM$          Extra command-line parameters that DS didn't use
  1658.         Page.String$    String to display while paging
  1659.         PageSound.1     First tone of page
  1660.         PageSound.2     Second tone of page
  1661.         PageSound.3     Third tone of page
  1662.         GameInfoCol     Column to start printing on game status line
  1663.         Default.Table$  Table containing a unaltered filter
  1664.         Table$          Specific filtering of characters for Incomm
  1665.         KeyBoardTimeOut Number of SECONDS for a keyboard time out
  1666.         Protected.Input$  Incomm displays this instead of what user types
  1667.         ANSI.Select$    Menu Manager's ANSI selection string
  1668.         NonAnsi.Select$ Menu Manager's NON-ANSI selection string
  1669.         Carrier.Check   Disables carrier checking (1 = Yes  0 = No)
  1670.         CarrierLossError  Causes ExitDoor to generate a error 255 if carrier
  1671.                           is dropped.
  1672.         No.Abort        Disables CTRL-X, CTRL-K keys from aborting screens
  1673.                         (1 = Yes  0 = No)
  1674.         AutoMore        Automatically prints more prompts/press any key prompts
  1675.         Lines.Since     Number of lines printed since last more/press prompt
  1676.         
  1677.  
  1678.   Door Source 4.0B
  1679.   Programmer's Manual - Page 40
  1680.  
  1681.         This is the reference for the UserBlock global variable
  1682.  
  1683.                                             PCBOARD/PCBOARD.SYS
  1684.                                            /  WILDCAT/CALLINFO.BBS
  1685.                                           /  /  RBBS/DORINFO1.DEF 
  1686.                                          /  /  /  DOOR.SYS
  1687.                                         /  /  /  /
  1688.   Variable                Type          P  W  R  D   Description
  1689.  -------------------     -----------    -  -  -  -   -------------------------
  1690.  CityState            AS STRING * 24    Y  Y  Y  Y   City and state of user
  1691.  Password             AS STRING * 12    Y  Y     Y   User's Password
  1692.  BusinessPhone        AS STRING * 13    Y        Y   User's Business/Data phone
  1693.  VoicePhone           AS STRING * 13    Y  Y     Y   User's Voice/Home phone
  1694.  LastDateOn           AS STRING * 20    Y  Y     Y   Last date user was on
  1695.  LastTimeOn           AS STRING * 5     Y            Last time user was on
  1696.  ExpertMode           AS STRING * 1     Y  Y     Y   Expert mode "Y" or "N"
  1697.  ProtocolType         AS STRING * 5     Y  Y     Y   Protocol selected
  1698.  LastDirListing       AS STRING * 10    Y  Y         Last date viewed dir
  1699.  SecurityLevel        AS INTEGER        Y  Y  Y  Y   Security Level for user
  1700.  TimesOn              AS INTEGER        Y  Y     Y   Number of times on before
  1701.  PageLength           AS INTEGER        Y  Y         Page length for user
  1702.  TotalUploads         AS INTEGER        Y  Y     Y   Total # of uploads made
  1703.  TotalDownloads       AS INTEGER        Y  Y     Y   Total # of downloads made
  1704.  DailyDownloadBytes   AS DOUBLE         Y            # of download bytes left
  1705.  UserComment          AS STRING * 30    Y            User Comment field
  1706.  SysopComment         AS STRING * 30    Y            Sysop Comment field
  1707.  ElapsedTime          AS INTEGER        Y  Y         Elapsed Time on system  1
  1708.  Subscription         AS STRING * 20    Y
  1709.  SubscriptionExpire   AS STRING * 20    Y
  1710.  AreaRegistration     AS STRING * 50    Y  Y     Y   Areas user has access to
  1711.  AreaExpire           AS STRING * 50    Y
  1712.  AreasToScan          AS STRING * 50    Y
  1713.  TotalDownloadBytes   AS DOUBLE         Y  Y     Y   Total bytes downloaded
  1714.  TotalUploadBytes     AS DOUBLE         Y            Total bytes uploaded
  1715.  DeleteFlag           AS STRING * 1     Y            Flag to delete user
  1716.  TimeEnteredDoor      AS STRING * 5     Y  Y  Y  Y   Time user entered door
  1717.  AreaFrom             AS INTEGER        Y        Y   Area user exited from
  1718.  MemorizedMessage     AS LONG           Y            Memorized message #
  1719.  TimeCalled           AS STRING * 5     Y  Y         Time user called bbs
  1720.  DailyDownloadTotal   AS INTEGER           Y         Total downloads TODAY
  1721.  MaxDownloadLimit     AS DOUBLE            Y         Max downloads TODAY
  1722.  LastRead             AS INTEGER           Y         Message last read
  1723.  MaxDownloadKLimit    AS DOUBLE         Y  Y     Y   Max d/l K TODAY
  1724.  ExpirationDate       AS STRING * 10             Y
  1725.  LR0                  AS STRING * 4     Y
  1726.  LR1                  AS STRING * 4     Y
  1727.  LR2                  AS STRING * 4     Y
  1728.       .
  1729.       .
  1730.  LR39                 AS STRING * 4     Y
  1731.  
  1732.  
  1733.   Door Source 4.0B
  1734.   Programmer's Manual - Page 41
  1735.  
  1736.         Appendix E - Script Commands Reference
  1737.         --------------------------------------
  1738.         Script commands are several small routines packed all into one.
  1739.         In order to access them, you set the according variables, and
  1740.         then make a call to ScriptCMD routine. For example, if you
  1741.         wanted to display a Press [ANY KEY] to continue prompt, you
  1742.         could do this:
  1743.                 I1$ = "PRES"
  1744.                 CALL ScriptCMD
  1745.         Variables I1$, I2$, and I3$ are all INPUT variables that store
  1746.         information for the routine to use. O1$, O2$, and O3$ are all OUTPUT
  1747.         variables that return information from the routine to you.
  1748.         I1$ is always the name of the routine you're calling inside of
  1749.         ScriptCMD. You only have to specify the first 4 letters of the
  1750.         word unless stated in the documentation.
  1751.  
  1752.  
  1753.   Door Source 4.0B
  1754.   Programmer's Manual - Page 42
  1755.  
  1756.         LTRIM
  1757.  
  1758.         Purpose: To trim all leading spaces
  1759.  
  1760.         Name in ScriptCMD: LTRIM
  1761.  
  1762.         Remarks: This routine is a simple truncation routine to remove
  1763.         all leading spaces from a string.
  1764.  
  1765.         Parameters Passed:
  1766.                 I2$ - The string to be truncated
  1767.  
  1768.         Parameters Returned:
  1769.                 O1$ - The truncated string
  1770.  
  1771.  
  1772.   Door Source 4.0B
  1773.   Programmer's Manual - Page 43
  1774.  
  1775.         RTRIM
  1776.  
  1777.         Purpose: To trim all trailing spaces
  1778.  
  1779.         Name in ScriptCMD: RTRIM
  1780.  
  1781.         Remarks: This routine is a simple routine to truncate all trailing
  1782.         spaces from a string.
  1783.  
  1784.         Parameters Passed:
  1785.                 I2$ - The string to be truncated
  1786.  
  1787.         Parameters Returned:
  1788.                 O1$ - The truncated string
  1789.  
  1790.  
  1791.   Door Source 4.0B
  1792.   Programmer's Manual - Page 44
  1793.  
  1794.         Upper Case
  1795.  
  1796.         Purpose: To convert a string to all upper case
  1797.  
  1798.         Name in ScriptCMD: UPPER
  1799.  
  1800.         Remarks: This routine will convert a string into all upper case
  1801.  
  1802.         Parameters Passed:
  1803.                 I2$ - The string to be converted
  1804.  
  1805.         Parameters Returned:
  1806.                 O1$ - The converted string
  1807.  
  1808.  
  1809.   Door Source 4.0B
  1810.   Programmer's Manual - Page 45
  1811.  
  1812.         Lower case
  1813.  
  1814.         Purpose: To convert a string to all lower case
  1815.  
  1816.         Name in ScriptCMD: LOWER
  1817.  
  1818.         Remarks: This routine will convert a string into all lower case
  1819.  
  1820.         Parameters Passed:
  1821.                 I2$ - The string to be converted
  1822.  
  1823.         Parameters Returned:
  1824.                 O1$ - The converted string
  1825.  
  1826.  
  1827.   Door Source 4.0B
  1828.   Programmer's Manual - Page 46
  1829.  
  1830.         More Prompt
  1831.  
  1832.         Purpose: To display a more prompt
  1833.  
  1834.         Name in ScriptCMD: MORE
  1835.  
  1836.         Remarks: This will display a more prompt and allow the user to
  1837.         select Yes to continue, No to abort, and C to go non-stop. It
  1838.         will return a Y (for yes), a N (for no), or a C (for non-stop)
  1839.         in O1$
  1840.  
  1841.         Parameters Passed: None
  1842.  
  1843.         Parameters Returned:
  1844.                 O1$ - Contains a Y, N, or C
  1845.  
  1846.  
  1847.   Door Source 4.0B
  1848.   Programmer's Manual - Page 47
  1849.  
  1850.         Press Any Key
  1851.  
  1852.         Purpose: To display a Press [ANY KEY] to continue prompt
  1853.  
  1854.         Name inside ScriptCMD: PRESS
  1855.  
  1856.         Remarks: This will display a Press [ANY KEY] to continue prompt and
  1857.         then wait for the key to be pressed:
  1858.  
  1859.         Parameters Passed: None
  1860.  
  1861.         Parameters Returned: None
  1862.  
  1863.  
  1864.   Door Source 4.0B
  1865.   Programmer's Manual - Page 48
  1866.  
  1867.         Exist
  1868.  
  1869.         Purpose: To check if a file exists
  1870.  
  1871.         Name inside ScriptCMD: EXIST
  1872.  
  1873.         Remarks: This will check for the existence of the file specified.
  1874.  
  1875.         Parameters Passed:
  1876.                 I2$ - Drive/Path/Location of file to check for
  1877.  
  1878.         Parameters Returned:
  1879.                 O1$ - If the file exists
  1880.                       (Y = Yes  N = No)
  1881.  
  1882.  
  1883.   Door Source 4.0B
  1884.   Programmer's Manual - Page 49
  1885.  
  1886.         Name conversion
  1887.  
  1888.         Purpose: To convert a name into proper upper and lower case
  1889.  
  1890.         Name inside ScriptCMD: NAMECASE
  1891.  
  1892.         Remarks: This will take a name like "DR. JOHN DOE" and properly
  1893.         convert it into "Dr John Doe"
  1894.  
  1895.         Parameters Passed:
  1896.                 I2$ - The name to be converted
  1897.  
  1898.         Parameters Returned:
  1899.                 O1$ - The converted name
  1900.  
  1901.  
  1902.   Door Source 4.0B
  1903.   Programmer's Manual - Page 50
  1904.  
  1905.         Coding and Decoding
  1906.  
  1907.         Purpose: To code and decode a string
  1908.  
  1909.         Name inside ScriptCMD: CODER
  1910.  
  1911.         Remarks: This is a simple coding routine that will resist causal
  1912.         attempts to break it. It will code and decode with the same password.
  1913.         The longer the password, the better the protection you will have.
  1914.         The password shouldn't have any high ASCII characters in it.
  1915.  
  1916.         Parameters Passed:
  1917.                 I2$ - String to be coded/decode
  1918.  
  1919.                 I3$ - Password to code/decode with
  1920.  
  1921.         Parameters Returned:
  1922.                 O1$ - The coded/decoded string
  1923.  
  1924.  
  1925.   Door Source 4.0B
  1926.   Programmer's Manual - Page 51
  1927.  
  1928.         Reverse Bits
  1929.  
  1930.         Purpose: To reverse the bits in a string
  1931.  
  1932.         Name inside ScriptCMD: REVERSEBITS (MUST USE ENTIRE NAME!)
  1933.  
  1934.         Remarks: This will take all of the characters in a string and reverse
  1935.         it's bits. This is a simple, but easy to break coding routine. To
  1936.         unreverse the bits, just call the routine again.
  1937.  
  1938.         Parameters Passed:
  1939.                 I2$ - The string to bit reverse
  1940.  
  1941.         Parameters Returned:
  1942.                 O1$ - The bit reversed string
  1943.  
  1944.  
  1945.   Door Source 4.0B
  1946.   Programmer's Manual - Page 52
  1947.  
  1948.         Reverse Characters
  1949.  
  1950.         Purpose: To reverse the order of characters in a string
  1951.  
  1952.         Name inside ScriptCMD: REVERSECHARS (MUST USE ENTIRE NAME!)
  1953.  
  1954.         Remarks: This changes the order of characters in a string so that
  1955.         the first is last, and the last is first, and so on throughout the
  1956.         entire string. To decode it, simply call the routine again.
  1957.  
  1958.         Parameters Passed:
  1959.                 I2$ - The string to be reversed
  1960.  
  1961.         Parameters Returned:
  1962.                 O1$ - The reversed string
  1963.  
  1964.  
  1965.   Door Source 4.0B
  1966.   Programmer's Manual - Page 53
  1967.  
  1968.         Appendix F - Command Reference
  1969.         ------------------------------
  1970.  
  1971.         Each command is shown in a set format. The format is as follows:
  1972.  
  1973.         Name of routine
  1974.  
  1975.         Purpose: States the prupose of the routine
  1976.  
  1977.         Remarks: Tells you the general information on the routine and how
  1978.         to use it.
  1979.  
  1980.         Parameters Passed: Tells you what parameters to the routine and what
  1981.             they are for.
  1982.  
  1983.         Parameters Returned: Tells you what parameters are returned and what
  1984.             is in them.
  1985.  
  1986.         Example: A short little program showing the usage of the routine
  1987.  
  1988.         See Also: (on some routines) Gives you a reference to other routines
  1989.             that do nearly the same thing or that work with this routine.
  1990.   Door Source 4.0B
  1991.   Programmer's Manual - Page 54
  1992.  
  1993.         AdjustTimeLimit
  1994.  
  1995.         Purpose: To adjust the user's time remaining
  1996.  
  1997.         Syntax: CALL AdjustTimeLimit(Minutes)
  1998.  
  1999.         Remarks: This will adjust the user's time remaining up or down
  2000.         depending on the number you pass it. You *MUST* pass a variable
  2001.         and not a number as the parameter, otherwise the time will not
  2002.         change. The TimeLeft: on the status line will be updated on the
  2003.         next call to the Send command.
  2004.  
  2005.         Parameters Passed:
  2006.                 Minutes - The number of minutes to increase the user's time
  2007.  
  2008.         Parameters Returned: None
  2009.  
  2010.         Example:
  2011.                 TimeAdjust = 10
  2012.                 CALL AdjustTimeLimit(TimeAdjust)     ' Give 10 minutes
  2013.                 TimeAdjust = -10
  2014.                 CALL AdjustTimeLimit(TimeAdjust)     ' Take 10 minutes
  2015.  
  2016.   Door Source 4.0B
  2017.   Programmer's Manual - Page 55
  2018.  
  2019.         AllTrun$
  2020.  
  2021.         Purpose: To truncate all leading and trailing spaces from a string
  2022.  
  2023.         Syntax: Text$ = AllTrun$(Text$)
  2024.  
  2025.         Remarks: This will remove all of those leading and trailing spaces
  2026.         that are a result of random file input, use of STR$, and other
  2027.         functions of BASIC.
  2028.  
  2029.         Parameters Passed:
  2030.                 Text$ - The string to remove leading and trailing spaces from
  2031.  
  2032.         Parameters Returned:
  2033.                 Text$ - The string without leading and trailing spaces
  2034.  
  2035.         Example:
  2036.                 Text$ = "   These extra spaces will be removed   "
  2037.                 Text$ = AllTrun$(Text$)
  2038.   Door Source 4.0B
  2039.   Programmer's Manual - Page 56
  2040.  
  2041.         ANSIMusic
  2042.  
  2043.         Purpose: To play ANSI music to those users who can use it
  2044.  
  2045.         Syntax: CALL ANSIMusic(Music$, Music)
  2046.  
  2047.         Remarks: Some communacations programs can support and play ANSI music
  2048.         but not all of them. Qmodem, for example, will play ANSI music. You
  2049.         should ask your users near the beginning of the program "Do you have
  2050.         ANSI music?" and if they answer yes, then set Music to Yes (1)
  2051.         otherwise set it to No (0). You don't have to use Music, but whatever
  2052.         variable you store that value in should always be the second parameter
  2053.         of the call to this routine. The music string can be anything that
  2054.         the BASIC command PLAY would be able to play. The local speaker
  2055.         won't play the music unless the page bell is on.
  2056.  
  2057.         Parameters Passed:
  2058.                 Music$ - The music to be played
  2059.  
  2060.                 Music - If the user supports ANSI music or not
  2061.                         (1 = Yes  0 = No)
  2062.  
  2063.         Parameters Returned: None
  2064.  
  2065.         Example:
  2066.                 Music = Yes
  2067.                 Music$ = "ABCDEFG"
  2068.                 CALL ANSIMusic(Music$, Music)
  2069.  
  2070.   Door Source 4.0B
  2071.   Programmer's Manual - Page 57
  2072.  
  2073.         BackSpace
  2074.  
  2075.         Purpose: To backspace on the local and remote screen and also erase
  2076.         the proper character in the string passed
  2077.  
  2078.         Syntax: CALL BackSpace(Text$)
  2079.  
  2080.         Remarks: This will allow you to write your own input routines for
  2081.         use, and when a user presses the backspace key, call this routine and
  2082.         it will send the proper backspacing codes and erase the backspaced
  2083.         character from the string passed.
  2084.  
  2085.         Parameters Passed:
  2086.                 Text$ - A string that will the backspace will be preformed on
  2087.  
  2088.         Parameters Returned:
  2089.                 Text$ - The new string with the last character erased
  2090.  
  2091.         Example:
  2092.                 IF KeyPressed$ = CHR$(8) THEN
  2093.                    CALL BackSpace(Text$)
  2094.                 END IF
  2095.  
  2096.   Door Source 4.0B
  2097.   Programmer's Manual - Page 58
  2098.  
  2099.         BackSpaceOver
  2100.  
  2101.         Purpose: To erase what is already on a line
  2102.  
  2103.         Syntax: CALL BackSpaceOver
  2104.  
  2105.         Remarks: This routine will backspace over everything to column 1,
  2106.         erasing everything on that line. If you have a prompt that you'd
  2107.         like to erase or something, this is the routine to call to erase
  2108.         it.
  2109.  
  2110.         Parameters Passed: None
  2111.  
  2112.         Parameters Returned: None
  2113.  
  2114.         Example:
  2115.                 CALL BackSpaceOver
  2116.  
  2117.         See Also: BackSpaceToCol
  2118.  
  2119.         
  2120.   Door Source 4.0B
  2121.   Programmer's Manual - Page 59
  2122.  
  2123.         BackSpaceToCol
  2124.  
  2125.         Purpose: To backspace over to the specified column
  2126.  
  2127.         Syntax: CALL BackSpaceToCol(Col)
  2128.  
  2129.         Remarks: This will backspace over from the current column all the
  2130.         way to the column specified. This is useful if the user inputed a
  2131.         improper response to a prompt and you want to erase just the user's
  2132.         input.
  2133.  
  2134.         Parameters Passed:
  2135.              Col - The column to backspace over to
  2136.  
  2137.         Parameters Returned: None
  2138.  
  2139.         Example:
  2140.                 CALL Send("Backspace to here->this will be erased!",No,No,10)
  2141.                 CALL BackSpaceToCol(20)
  2142.  
  2143.         See Also: BackSpaceOver
  2144.  
  2145.   Door Source 4.0B
  2146.   Programmer's Manual - Page 60
  2147.  
  2148.         BeepSpeaker
  2149.  
  2150.         Purpose: To sound the local and remote speaker
  2151.  
  2152.         Syntax: CALL BeepSpeaker
  2153.  
  2154.         Remarks: Calling BeepSpeaker instead of sending a bell code to the
  2155.         screen and com port is better since it will always beep the remote
  2156.         speaker but won't make the local speaker sound unless the page bell
  2157.         is on.
  2158.  
  2159.         Parameters Passed: None
  2160.  
  2161.         Parameters Returned: None
  2162.  
  2163.         Example:
  2164.                 CALL BeepSpeaker        
  2165.         
  2166.   Door Source 4.0B
  2167.   Programmer's Manual - Page 61
  2168.  
  2169.         BlockSend
  2170.  
  2171.         Purpose: To send a large amount of information to both displays
  2172.  
  2173.         Syntax: CALL BlockSend(Array$(), Center, Lines.To.Send)
  2174.  
  2175.         Remarks: This will send a large pre-programmed amount of data
  2176.         to the local and remote displays. Color can only be set and
  2177.         changed via @X codes. This routine is good for programmed in
  2178.         documentation, or menus.
  2179.  
  2180.         Parameters Passed:
  2181.                 Array$() - The array to be displayed
  2182.  
  2183.                 Center - Center text to be displayed
  2184.  
  2185.                 Lines.To.Send - Number of array elements to display
  2186.  
  2187.         Parameters Returned: None
  2188.  
  2189.         Example:
  2190.                 Array$(1) = "This will be displayed"
  2191.                 Array$(2) = "Using the BlockSend routine"
  2192.                 CALL BlockSend(Array$(), No, 2)
  2193.  
  2194.         See Also: ColorEasy, RainbowSend, Send, QSend
  2195.  
  2196.   Door Source 4.0B
  2197.   Programmer's Manual - Page 62
  2198.  
  2199.         Center
  2200.  
  2201.         Purpose: To aid in centering strings for output
  2202.  
  2203.         Syntax: CALL Center(Text$)
  2204.  
  2205.         Remarks: This will strip out all @X codes and substitute in the
  2206.         proper text for substitution codes and will then set TabSpace to
  2207.         equal the correct column to make the string look centered. The
  2208.         string that you pass is NOT modified by this routine. This routine
  2209.         also will NOT print out the results but only set TabSpace.
  2210.  
  2211.         Parameters Passed:
  2212.                 Text$ - The string to be centered
  2213.  
  2214.         Parameters Returned: None
  2215.  
  2216.         Example:
  2217.                 Text$ = "This will be centered!"
  2218.                 CALL Center(Text$)
  2219.                 CALL Send(Text$, No, Yes, 10)
  2220.   Door Source 4.0B
  2221.   Programmer's Manual - Page 63
  2222.  
  2223.         ChangeCTS
  2224.  
  2225.         Purpose: To raise or lower the CTS flag
  2226.  
  2227.         Syntax: CALL ChangeCTS(OnOff)
  2228.  
  2229.         Remarks: This will turn on or off the CTS (Clear To Send) flag
  2230.         which is used to tell the other modem that it is okay to send
  2231.         characters. Modem that don't preform error checking or UARTS
  2232.         that don't have buffers may require CTS flow-control to be on
  2233.         during high speed file transfers.
  2234.  
  2235.         Parameters Passed:
  2236.              OnOff - Whether you want the CTS on or off
  2237.                      (1 = Yes(On)  0 = No(Off))
  2238.  
  2239.         Parameters Returned: None
  2240.  
  2241.         Example:
  2242.              CALL ChangeCTS(No)         ' Turns CTS off
  2243.         
  2244.         See Also: ChangeDTR, ChangeRTS
  2245.   Door Source 4.0B
  2246.   Programmer's Manual - Page 64
  2247.  
  2248.         ChangeDTR
  2249.  
  2250.         Purpose: To raise or lower the DTR
  2251.         
  2252.         Syntax: CALL ChangeDTR(OnOff)
  2253.  
  2254.         Remarks: If you want to drop the carrier on someone, this is one of
  2255.         the best ways to do it. Turning the DTR off normally will cut a person
  2256.         off-line, but not always.
  2257.      
  2258.         Parameters Passed:
  2259.              OnOff - Whether you want the DTR on or off
  2260.                      (1 = Yes(On)  0 = No(Off)
  2261.  
  2262.         Parameters Returned: None
  2263.  
  2264.      
  2265.         Example:
  2266.              CALL ChangeDTR(No)         ' Turns off DTR
  2267.  
  2268.         See Also: ChangeCTS, ChangeRTS
  2269.  
  2270.         
  2271.   Door Source 4.0B
  2272.   Programmer's Manual - Page 65
  2273.  
  2274.         ChangeRTS
  2275.  
  2276.         Purpose: To raise or lower the RTS flag
  2277.  
  2278.         Syntax: CALL ChangeRTS(OnOff)
  2279.  
  2280.         Remarks: The RTS (Request To Send) flag is uesd by most auto-dial
  2281.         modems to see if a computer is ready to recieve data from the modem.
  2282.         If the RTS signal isn't detected, some modems may refuse to accept
  2283.         modem commands or send result codes.
  2284.  
  2285.         Parameters Passed:
  2286.              OnOff - Whether you want the RTS on or off
  2287.                      (1 = Yes(On)  0 = No(Off))
  2288.  
  2289.         Parameters Returned: None
  2290.  
  2291.         Example:
  2292.              CALL ChangeRTS(No)         ' Turns RTS off
  2293.  
  2294.         See Also: ChangeDTR, ChangeCTS
  2295.  
  2296.   Door Source 4.0B
  2297.   Programmer's Manual - Page 66
  2298.  
  2299.         CheckCarrier
  2300.  
  2301.         Purpose: To check if a carrier is present
  2302.  
  2303.         Syntax: CALL CheckCarrier(CarrierPresent)
  2304.  
  2305.         Remarks: This will (as long as Carrier.Check is set to 0) return
  2306.         a Yes (1) or a No (0) in the parameter depending on if the carrier
  2307.         is present. If the global variable Carrier.Check is set to 1, then
  2308.         this routine will return ALWAYS a Yes (1).
  2309.  
  2310.         Parameters Passed: None
  2311.  
  2312.         Parameters Returned:
  2313.              CarrierPresent - Tells if the carrier is present
  2314.                               (1 = Yes  0 = No)
  2315.  
  2316.         Example:
  2317.              CALL CheckCarrier(CarrierPresent)
  2318.              IF CarrierPresent = Yes THEN
  2319.                 CALL Send("You're still connected!", No, Yes, 10)
  2320.              END IF
  2321.            Door Source 4.0B
  2322.   Programmer's Manual - Page 67
  2323.  
  2324.         CheckTimeLeft
  2325.  
  2326.         Purpose: To tell you how many minutes a user has left on the system
  2327.  
  2328.         Syntax: TimeRemaining = CheckTimeLeft
  2329.  
  2330.         Remarks: This function will return the number of minutes that the user
  2331.         currently on has left for this call. Be careful not to assign the
  2332.         value returned to a variable named TimeLeft because doing so will
  2333.         modify Door Source's variable and cause the user's time to go berserk!
  2334.  
  2335.         Parameters Passed: None
  2336.  
  2337.         Parameters Returned:
  2338.                 TimeRemaining - The number of minutes left the user has
  2339.  
  2340.         Example:
  2341.                 CALL Send("("+STR$(CheckTimeLeft)+" min. left )", No, No, 14)
  2342.  
  2343.         See Also: AdjustTimeLimit
  2344.  
  2345.   Door Source 4.0B
  2346.   Programmer's Manual - Page 68
  2347.  
  2348.         ClrScrn
  2349.  
  2350.         Purpose: To clear the local and remote screens
  2351.  
  2352.         Syntax: CALL ClrScrn
  2353.  
  2354.         Remarks: This will effectively clear the screen for both sides
  2355.         using the fastest method that the caller can use. Setting
  2356.         BackGroundColor previous to calling this routine will cause the
  2357.         entire screen to be that color!
  2358.  
  2359.         Parameters Passed: None
  2360.  
  2361.         Parameters Returned: None
  2362.  
  2363.         Example:
  2364.                 CALL ClrScrn
  2365.  
  2366.   Door Source 4.0B
  2367.   Programmer's Manual - Page 69
  2368.  
  2369.         ColorEasy
  2370.  
  2371.         Purpose: To colorize a string and output it
  2372.  
  2373.         Syntax: CALL ColorEasy(Text$, Color.To.Use, Send.Enter)
  2374.  
  2375.         Remarks: If you have a string that you'd like to colorize without
  2376.         having to bother with multiple calls to Send or with @X codes, then
  2377.         use this routine. It will colorize A-Z, a-z, 0-9, and punctuation
  2378.         all in different colors. The Color.To.Use that you specify will
  2379.         affect the output of color over the whole text, experiment with
  2380.         different values to best fit what you need.
  2381.  
  2382.         Parameters Passed:
  2383.                 Text$ - The string to be colorized and displayed
  2384.  
  2385.                 Color.To.Use - This will vary the output for the different
  2386.                                colors used in coloring the text
  2387.  
  2388.                 Send.Enter - Send a CR/LF sequence once displaying is finished
  2389.  
  2390.         Parameters Returned: None
  2391.  
  2392.         Example:
  2393.                 Text$ = "This will be VERY colorful!!"
  2394.                 CALL ColorEasy(Text$, 10, Yes)
  2395.  
  2396.         See Also: BlockSend, RainbowSend, Send, QSend
  2397.  
  2398.   Door Source 4.0B
  2399.   Programmer's Manual - Page 70
  2400.  
  2401.         CommInkey$
  2402.  
  2403.         Purpose: To get a key from just the remote keyboard
  2404.  
  2405.         Syntax: Character$ = CommInkey$ 
  2406.  
  2407.         Remarks: This works just like INKEY$ and CommKeyInkey$, except it
  2408.         will take input ONLY from the com port. If there are no characters
  2409.         waiting to be read, then it will return a null.
  2410.  
  2411.         Parameters Passed: None
  2412.  
  2413.         Parameters Returned:
  2414.              Character$ - The character read from the com port
  2415.  
  2416.         Example:
  2417.              DO
  2418.              LOOP UNTIL (CommInkey$ <> "") OR (INKEY$ <> "")
  2419.  
  2420.         See Also: CommKeyInkey$
  2421.   Door Source 4.0B
  2422.   Programmer's Manual - Page 71
  2423.  
  2424.         CommKeyInkey$
  2425.  
  2426.         Purpose: To get one character from the local or remote keyboard
  2427.  
  2428.         Syntax: Character$ = CommKeyInkey$
  2429.  
  2430.         Remarks: This will check the local keyboard and the com port buffer
  2431.         for keys waiting to be read, if one is found, it will read it and
  2432.         return it, otherwise it will return a null. If you want to wait for
  2433.         a key to be pressed, you should put this routine in a WHILE loop.
  2434.  
  2435.         Parameters Passed: None
  2436.  
  2437.         Parameters Returned:
  2438.                 Character$ - Either null (if no key was pressed local or
  2439.                              remote) or a key from the keyboard or com port
  2440.                              buffer.
  2441.  
  2442.         Example:
  2443.                 DO
  2444.                    Character$ = CommKeyInkey$
  2445.                 LOOP UNTIL Character$ <> ""
  2446.  
  2447.         See Also: Incomm, CommInkey$
  2448.   Door Source 4.0B
  2449.   Programmer's Manual - Page 72
  2450.  
  2451.         CopyAFile
  2452.  
  2453.         Purpose: To quickly copy a file without shelling to DOS
  2454.  
  2455.         Syntax: CALL CopyAFile(Source$, Destination$, ErrCode)
  2456.  
  2457.         Remarks: This will copy a file without the pitfalls of shelling to
  2458.         DOS to do it or of special complex programming. It will return
  2459.         a error code if an error occured.
  2460.  
  2461.         Parameters Passed:
  2462.              Source$ - Drive/Path/Filename of the file to be copied
  2463.  
  2464.              Destination$ - Drive/Path/Filename of the file to be created
  2465.  
  2466.         Parameters Returned:
  2467.              ErrCode - If a error occured during the copy
  2468.                        (1 = Yes  0 = No)
  2469.  
  2470.         Example:
  2471.              Source$ = "MYFILE.TXT"
  2472.              Destination$ = "MYFILE2.TXT"
  2473.              CALL CopyAFile(Source$, Destination$, ErrCode)
  2474.   Door Source 4.0B
  2475.   Programmer's Manual - Page 73
  2476.  
  2477.         DayOfWeek
  2478.  
  2479.         Purpose: To calculate the which day of the week it is
  2480.  
  2481.         Syntax: Day = DayOfWeek
  2482.  
  2483.         Remarks: This routine will return a value from 1 to 7 indicating
  2484.         which day of the week it is. A 1 is Sunday, 2 is Monday, and so on.
  2485.  
  2486.         Parameters Passed: None
  2487.  
  2488.         Parameters Returned:
  2489.                 Day - A number from 1-7 representing the day of the week
  2490.  
  2491.         Example:
  2492.                 IF DayOfWeek = 1 THEN
  2493.                    CALL Send("It's SUNDAY!", No, Yes, 14)
  2494.                 ELSE
  2495.                    CALL Send("It's not sunday!", No, Yes, 10)
  2496.                 END IF
  2497.   Door Source 4.0B
  2498.   Programmer's Manual - Page 74
  2499.  
  2500.         DoorBusy
  2501.  
  2502.         Purpose: To keep a door from being used by two nodes at once
  2503.  
  2504.         Syntax: CALL DoorBusy
  2505.  
  2506.         Remarks: If you aren't going to program multi-node support, call
  2507.         this routine so that multinode systems won't have problems running
  2508.         your door. You have to set the global variable BusyFile$ to the
  2509.         drive/path/filename of a "lockout file" that will be the signal
  2510.         to other nodes that the door is in use. If another node is using your
  2511.         door, then this routine will call DoorBusy and not return control
  2512.         to your program.
  2513.  
  2514.         Parameters Passed: None
  2515.  
  2516.         Parameters Returned: None
  2517.  
  2518.         Example:
  2519.                 BusyFile$ = "MYDOOR.NET"
  2520.                 CALL DoorBusy
  2521.   Door Source 4.0B
  2522.   Programmer's Manual - Page 75
  2523.  
  2524.         EntryIncomm
  2525.  
  2526.         Purpose: To provide a field showing maximum length of input for prompt
  2527.  
  2528.         Syntax: CALL EntryIncomm(Text$, MaxLength, FieldColor, Color.To.Use)
  2529.  
  2530.         Remarks: This is a handy routine to for larger fields (3 characters and
  2531.         larger) that lets the user know what the limit is on the field size by
  2532.         printing above the prompt a (------) field indicator showing the
  2533.         maximum number of characters allowed.
  2534.  
  2535.         Parameters Passed:
  2536.                 Text$ - Prompt to display
  2537.  
  2538.                 MaxLength - Maximum number of characters to allow for input
  2539.                             (Required to be greater than 1)
  2540.  
  2541.                 FieldColor - The color of the (---) field above the prompt
  2542.  
  2543.                 Color.To.Use - The foreground color for the prompt itself
  2544.  
  2545.         Parameters Returned:
  2546.                 ARG$ - The input received
  2547.  
  2548.         Example:
  2549.                 See PRMTDEMO.BAS
  2550.  
  2551.                 Text$ = "Enter your name:"
  2552.                 CALL EntryIncomm(Text$, 20, 10, 11)
  2553.                 ' This would output
  2554.                 '                (--------------------)
  2555.                 ' Enter your name:
  2556.  
  2557.         See Also: PromptIncomm, Incomm
  2558.   Door Source 4.0B
  2559.   Programmer's Manual - Page 76
  2560.  
  2561.         ExtendedCode
  2562.  
  2563.         Purpose: To let you trap F-keys in your own I/O routines
  2564.  
  2565.         Syntax: CALL ExtendedCode(CodeToProcess$, NULL)
  2566.  
  2567.         Remarks: If you are writing your own version of Incomm, and would
  2568.         like to take advantage of Door Source's F-Key processing routines,
  2569.         call this with the key pressed and it will take the necessary
  2570.         action, which may be updating the status bar or shelling to DOS.
  2571.  
  2572.         Parameters Passed:
  2573.                 CodeToProcess$ - The two character code of the key pressed
  2574.  
  2575.                 NULL - This variable shouldn't be used by your routine, it
  2576.                 is only used by Door Source and is specified only to maintain
  2577.                 compatibility.
  2578.  
  2579.         Parameters Returned: None
  2580.  
  2581.         Example:
  2582.                 A$ = INKEY$
  2583.                 IF LEN(A$)>1 THEN               ' Extended code
  2584.                    CALL ExtendedCode(A$, NULL)
  2585.                 END IF
  2586.   Door Source 4.0B
  2587.   Programmer's Manual - Page 77
  2588.  
  2589.         ExitDoor
  2590.  
  2591.         Purpose: To close the com port and update the bbs interface file
  2592.  
  2593.         Syntax: CALL ExitDoor
  2594.  
  2595.         Remarks: Whenever you want to end your door, you MUST call this
  2596.         routine. NEVER let your door simply just come to an end or have the
  2597.         END or SYSTEM command in it. This routine will uphold the DTR and
  2598.         cleanup Door Source's variables, handlers, etc,... It will also
  2599.         update the bbs interface file with the current information. After
  2600.         calling this routine, control will not be returned to your door.
  2601.  
  2602.         Parameters Passed: None
  2603.  
  2604.         Parameters Returned: None
  2605.  
  2606.         Example:
  2607.                 CALL ExitDoor
  2608.  
  2609.  
  2610.   Door Source 4.0B
  2611.   Programmer's Manual - Page 78
  2612.  
  2613.         FileExist
  2614.  
  2615.         Purpose: To detect is a file exists on a disk
  2616.  
  2617.         Syntax: Exists = FileExist(FileName$)
  2618.  
  2619.         Remarks: If you're opening files or preforming something with files
  2620.         you should check, before attempting use, if they exist and not assume
  2621.         that they are there, otherwise your program will generate a error
  2622.         and most likely crash the board it was running on.
  2623.  
  2624.         Parameters Passed:
  2625.                 FileName$ - Drive/Path/Filename to the file to be checked for
  2626.  
  2627.         Parameters Returned:
  2628.                 Exists - If the file exists or not
  2629.                          (-1 = Yes  0 = No)
  2630.  
  2631.         Example:
  2632.                 IF FileExist("MYFILE.FIL") THEN
  2633.                    CALL Send("It exists!", No, Yes, 12)
  2634.                 END IF
  2635.   Door Source 4.0B
  2636.   Programmer's Manual - Page 79
  2637.  
  2638.         FileOpen
  2639.  
  2640.         Purpose: To aid in opening files in a better, easier way
  2641.  
  2642.         Syntax: FileNumber = FileOpen(FileName$, Access$, Sharing, Length)
  2643.  
  2644.         Remarks: When you want to open a file and you don't know what the
  2645.         next available file number is, or you don't want to refer to files
  2646.         by their number, or if you don't want to have to fool with checking
  2647.         if a network is active every time a file is opened, this routine
  2648.         is what you should call. It will find the next available file number
  2649.         and open the file according to your specifications and return the
  2650.         file number to you in a variable so you can use it in place of a
  2651.         number.
  2652.  
  2653.         Parameters Passed:
  2654.                 FileName$ - This is the name of the file to be opened
  2655.                 Access$ - The method in which you want to open the file
  2656.                           for access.
  2657.                                 I - Sequential Input
  2658.                                 O - Sequential Output
  2659.                                 A - Append (Write at end of file)
  2660.                                 R - Random Read/Write
  2661.                                 B - Binary Read/Write
  2662.                 Sharing - Will open files to be shared if specified and a
  2663.                           network is active
  2664.                           (1 = Yes  0 = No)
  2665.                 Length - For random and binary files only, this will open
  2666.                          the file with this as the record length.
  2667.  
  2668.         Parameters Returned:
  2669.                 FileNumber - This is the variable you'd use for I/O with the
  2670.                              file. It will contain a -1 if the file wasn't
  2671.                              found that you tried to open only if you're
  2672.                              trying to do sequential input.
  2673.  
  2674.         Example:
  2675.                 FileNumber = FileOpen("MYFILE.FIL", "O", Yes, 0)
  2676.                 PRINT #FileNumber, "This is in the file"
  2677.                 CLOSE #FileNumber
  2678.  
  2679.                 FileNumber = FileOpen("MYFILE.FIL", "I", Yes, 0)
  2680.                 INPUT #FileNumber, DataFromFile$
  2681.                 CLOSE #FileNumber
  2682.   Door Source 4.0B
  2683.   Programmer's Manual - Page 80
  2684.  
  2685.         GameInfoUpdate
  2686.  
  2687.         Purpose: To write to the 25 line of the game line of the status line
  2688.  
  2689.         Syntax: CALL GameInfoUpdate(Text$, Send.Enter, ColorFore, ColorBack)
  2690.  
  2691.         Remarks: If you want a game status line, you should use this routine
  2692.         to update line 25 (which will be the game status line). It works
  2693.         just like the PRINT command would work with a few differences.
  2694.         The Send.Enter really doesn't advance to the next line, but resets
  2695.         the column pointer (GameInfoCol) to 1. If you want to start printing
  2696.         someplace other than where you are, just set GameInfoCol to the
  2697.         column number. See the Advanced Programming section for a detailed
  2698.         explanation of how this command works.
  2699.  
  2700.         WARNING: You HAVE to use the DSGAME.INT in your main module instead
  2701.         of DOORSORC.INT otherwise this routine will not work!
  2702.  
  2703.         Parameters Passed:
  2704.                 Text$ - String to be displayed on line 25
  2705.  
  2706.                 Send.Enter - Reset GameInfoCol to 1 after displaying
  2707.                              (1 = Yes  0 = No)
  2708.  
  2709.                 ColorFore - Foreground color to use
  2710.  
  2711.                 ColorBack - Background color to use
  2712.  
  2713.         Parameters Returned: None
  2714.  
  2715.         Example:
  2716.                 Text$ = "This is on the game status line!"
  2717.                 CALL GameInfoUpdate(Text$, No, 0, 7)
  2718.   Door Source 4.0B
  2719.   Programmer's Manual - Page 81
  2720.  
  2721.         GetTime
  2722.  
  2723.         Purpose: To separate the time into hours, minutes, and seconds
  2724.  
  2725.         Syntax: CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  2726.  
  2727.         Remarks: This will take the current time and return it to you
  2728.         in a separated form.
  2729.  
  2730.         Parameters Passed: None
  2731.  
  2732.         Parameters Returned:
  2733.                 Hours - The hour
  2734.  
  2735.                 Minutes - The minute
  2736.  
  2737.                 Seconds - The second
  2738.  
  2739.                 SinceMid# - The number of seconds since midnight
  2740.  
  2741.         Example:
  2742.                 CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  2743.                 CALL Send("Its "+STR$(Hours)+" o'clock", No, Yes, 10)
  2744.  
  2745.         See Also: TimeConvert
  2746.  
  2747.  
  2748.   Door Source 4.0B
  2749.   Programmer's Manual - Page 82
  2750.  
  2751.         HighScores
  2752.  
  2753.         Purpose: To make a high score bulletin
  2754.  
  2755.         Syntax: CALL HighScores(Score, HighScoreFile$, OutputNumber)
  2756.  
  2757.         Remarks: This will take the user's score and use the high score data
  2758.         file specified, update the information, and then either display a
  2759.         bulletin or save it to disk. The high score data file, if
  2760.         non-existent will be created, its a random access file and can't
  2761.         be read/modified in a text editor. Compression can be done with the
  2762.         compression utility included with the Door Source archive. You
  2763.         will need to open the file for output before calling this routine
  2764.         if you want to direct the output to a file, this also allows you
  2765.         to create a header (on screen or in the file) for your bulletin.
  2766.         The format of where HighScores places the information is like this:
  2767.  
  2768. <--21 spaces-------->(NAME OF USER)<---29 spaces--->(SCORE)
  2769.                      John Doe                       100
  2770.                      Jane Doe                       50
  2771.  
  2772.         Parameters Passed:
  2773.                 Score - Score for user
  2774.  
  2775.                 HighScoreFile$ - Name of the random access data file
  2776.                                  that HighScores creates
  2777.  
  2778.                 OutputNumber - The filenumber that output should go to, if
  2779.                                0 then output goes to screen
  2780.  
  2781.         Parameters Returned: None
  2782.  
  2783.         Example:
  2784.                 ScoreDataFile$ = "MYSCORE.SCO"
  2785.                 Score = 569
  2786.                 ScoreBlt = 1
  2787.                 OPEN "SCORES.BLT" FOR OUTPUT AS #1
  2788.                 CALL HighScores(Score, ScoreDataFile$, ScoreBlt)
  2789.   Door Source 4.0B
  2790.   Programmer's Manual - Page 83
  2791.  
  2792.         Incomm
  2793.  
  2794.         Purpose: To receive data from the keyboard and com port
  2795.  
  2796.         Syntax: CALL Incomm(Text$, Send.Enter, Max.Characters, Color.To.Use)
  2797.  
  2798.         Remarks: This is the basic input routine, it will check the keyboard
  2799.         and the remote keyboard for input. There are several variables that
  2800.         affect input for this routine, and they are all listed here:
  2801.                 Protected.Input$ - Incomm will show this character in place of
  2802.                                    what is really typed. Setting this to ""
  2803.                                    will cause normal display of input
  2804.  
  2805.                 TabSpace - The string to be displayed will be tabbed to this
  2806.                            column
  2807.  
  2808.                 User.Color - The user's input will be displayed in this color
  2809.  
  2810.                 Caps - Incomm will covert input to all caps before returning
  2811.                        (1 = Yes  0 = No)
  2812.  
  2813.                 No.Enter.Send - After input is completed, a CR/LF won't be
  2814.                                 sent (1 = Yes  0 = No)
  2815.  
  2816.                 EchoKey - Will make input not show up on the screens at all
  2817.                           (1 = Yes  0 = No)
  2818.  
  2819.                 Filter - This will filter out high ascii characters (128+)
  2820.                          (1 = Yes  0 = No)
  2821.  
  2822.                 Table$ - Set this to the only keys you want to be accepted
  2823.                          if you want to limit the user to a few keys. Set it
  2824.                          to Default.Table$ to restore it to normal.
  2825.  
  2826.                 BackGroundColor - This is the background color for the
  2827.                                   prompt and input.
  2828.  
  2829.         Parameters Passed:
  2830.                 Text$ - String to be sent as a prompt
  2831.  
  2832.                 Send.Enter - Send a CR/LF AFTER the prompt and BEFORE input
  2833.                              (1 = Yes  0 = No)
  2834.  
  2835.                 Max.Characters - The maximum number of character to accept
  2836.                                  Setting this to a -1 (or Hockey) will make
  2837.                                  Incomm take the first character it gets and
  2838.                                  not wait for ENTER to be pressed before
  2839.                                  returning.
  2840.                                  (0 = No limit  -1 = Hockey  < 1 = Limit)
  2841.  
  2842.                 Color.To.Use - Foreground color of prompt   Door Source 4.0B
  2843.   Programmer's Manual - Page 84
  2844.  
  2845.         Parameters Returned:
  2846.                 ARG$ - The input received
  2847.  
  2848.         Example:
  2849.                 ' You don't need to reset all of these variables each
  2850.                 ' time you call incomm, they are show here just so you
  2851.                 ' can see how they work.
  2852.                 Caps = Yes                      ' Turn input to all caps
  2853.                 Protected.Input$ = "*"          ' Show * instead of letters
  2854.                 Table$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"  ' Only accept A-Z
  2855.                 Text$="Enter your name:"
  2856.                 CALL Incomm(Text$, No, No, 10)
  2857.                 Protected.Input$ = ""           ' Show what is typed
  2858.                 CALL Incomm(Text$, No, 25, 10)  ' Limit to 25 characters
  2859.  
  2860.         See Also: CommInkey$   Door Source 4.0B
  2861.   Programmer's Manual - Page 85
  2862.  
  2863.         MenuManager
  2864.  
  2865.         Purpose: To make a scroll bar menu
  2866.  
  2867.         Syntax: CALL MenuManager(Menu$(), Center, TextClr, Bars, SlctClr,
  2868.                 BarFore, BarBack, BarSelected)
  2869.  
  2870.         Remarks: This will create a nice selectable menu with a scroll bar
  2871.         for ANSI users to scroll up and down. Non-ANSI users will see the
  2872.         menu, but will be forced to just enter a number and will have no
  2873.         scroll bar. You shouldn't have more than 20 selections on the menu,
  2874.         and all should be numbered. This routine is affected by several
  2875.         variables which are:
  2876.                 Up.Key$ - The key to move the bar up
  2877.                           (Default to +)
  2878.  
  2879.                 Down.Key$ - The key to move the bar down
  2880.                             (Default to -)
  2881.  
  2882.                 ANSI.Select$ - Selection string displayed for ANSI users
  2883.  
  2884.                 NonANSI.Select$ - Selection string displayed for NON-ANSI users
  2885.  
  2886.         Parameters Passed:
  2887.                 Menu$() - An array with all the menu selections in it
  2888.  
  2889.                 Center - Center the selections while displaying
  2890.  
  2891.                 TextClr - Color for selections
  2892.  
  2893.                 Bars - Number of selections in array
  2894.  
  2895.                 SlctClr - Color for ANSI.Select$ or NonANSI.Select$ string
  2896.  
  2897.                 BarFore - Foreground color for scroll bar
  2898.  
  2899.                 BarBack - Background color for scroll bar
  2900.  
  2901.         Parameters Returned:
  2902.                 BarSelected - The bar selected by the user
  2903.  
  2904.         Example:
  2905.                 See MENUDEMO.BAS included with Door Source
  2906.  
  2907.  
  2908.   Door Source 4.0B
  2909.   Programmer's Manual - Page 86
  2910.  
  2911.         MoveCursor
  2912.  
  2913.         Purpose: To position the cursor on the screen
  2914.  
  2915.         Syntax: CALL MoveCursor(X, Y)
  2916.  
  2917.         Remarks: Call this routine to position the cursor anywhere on the
  2918.         screen in the upper 22/23 lines (depending on if there is a game
  2919.         status line). This routine will not move the cursor if the user is
  2920.         not in ANSI mode.
  2921.  
  2922.         Parameters Passed:
  2923.                 X - The row (vertical)
  2924.  
  2925.                 Y - The column (horizontal)
  2926.  
  2927.         Parameters Returned: None
  2928.  
  2929.         Example:
  2930.                 CALL MoveCursor(10, 10)
  2931.  
  2932.  
  2933.   Door Source 4.0B
  2934.   Programmer's Manual - Page 87
  2935.  
  2936.         Parser
  2937.  
  2938.         Purpose: To separate data in a string with a delimiter
  2939.  
  2940.         Syntax: CALL Parser(SearchFor$, SearchIn$, ParArray$(), ErrCode)
  2941.  
  2942.         Remarks: This will take a string and look for the character specified
  2943.         and store the data in the array, it then repeats this process over
  2944.         and over until the end of the string has been reached. This can be
  2945.         handy to store numbers in a compact form for storage in a file.
  2946.  
  2947.         Parameters Passed:
  2948.                 SearchFor$ - The string (delimiter) to search for
  2949.  
  2950.                 SearchIn$ - The string to search in and to parse
  2951.  
  2952.         Parameters Returned:
  2953.                 ParArray$() - Contains the data from SearchIn$ but separated
  2954.  
  2955.                 ErrCode - Will greater than 1 is a error occurred
  2956.  
  2957.         Example:
  2958.                 SearchFor$ = "*"
  2959.                 SearchIn$ = "100*200*300*400*500*"
  2960.                 CALL Parser(SearchFor$, SearchIn$, ParArray$(), ErrCode)
  2961.                 FOR X = 1 TO 5
  2962.                    CALL Send(ParArray$(X), No, Yes, 10)
  2963.                 NEXT
  2964.                 ' This would output:
  2965.                 ' 100
  2966.                 ' 200
  2967.                 ' 300
  2968.                 ' 400
  2969.                 ' 500
  2970.   Door Source 4.0B
  2971.   Programmer's Manual - Page 88
  2972.  
  2973.         NL
  2974.  
  2975.         Purpose: To send the specified number of times a CR/LF sequence
  2976.  
  2977.         Syntax: CALL NL(Number.Of.Times)
  2978.  
  2979.         Remarks: This will send a CR/LF sequence the number of times you
  2980.         tell it to. This is base routine for all routines to advance to
  2981.         the next line.
  2982.  
  2983.         Parameters Passed:
  2984.                 Number.Of.Times - The number of times to display the CR/LF
  2985.                                   sequence.
  2986.  
  2987.         Parameters Returned: None
  2988.  
  2989.         Example:
  2990.                 CALL NL(3)              ' Print 3 CR/LF sequences
  2991.  
  2992.         See Also: Send
  2993.   Door Source 4.0B
  2994.   Programmer's Manual - Page 89
  2995.  
  2996.         PromptIncomm
  2997.  
  2998.         Purpose: To provide a very formatted input field with a prompt
  2999.  
  3000.         Syntax: CALL PromptIncomm(Text$, Default$, DefaultColor, MaxLength,
  3001.                 Color.To.Use)
  3002.  
  3003.         Remarks: This will make a little ( ) area for input to be inside of
  3004.         for ANSI users, non-ANSI users will just have a regular prompt. This
  3005.         routine also allows to easily add a "default" to the prompt.
  3006.  
  3007.         Parameters Passed:
  3008.                 Text$ - Prompt to display
  3009.  
  3010.                 Default$ - "Default" field. Some predefined ones are:
  3011.                            Default1 = (Enter=no)
  3012.                            Default2 = (Enter=none)
  3013.                            Default3 = (Enter=quits)
  3014.  
  3015.                 DefaultColor - Foreground color for default text
  3016.  
  3017.                 MaxLength - Maximum number of characters (Required to be
  3018.                             greater than 0)
  3019.  
  3020.                 Color.To.Use - Foreground color for prompt
  3021.  
  3022.         Parameters Returned:
  3023.                 ARG$ - The input received
  3024.  
  3025.         Example:
  3026.                 See PRMTDEMO.BAS
  3027.  
  3028.                 Text$ = "Enter your name"
  3029.                 CALL PromptIncomm(Text$, Default3, 15, 10, 11)
  3030.                 IF AllTrun$(ARG$) = "" THEN
  3031.                    ' Process default
  3032.                 ELSE
  3033.                    ' Process other
  3034.                 END IF
  3035.                 ' This would output
  3036.                 ' Enter your name (Enter=quits) ? (         )
  3037.                 ' The input would be displayed inside the ( )
  3038.  
  3039.         See Also: EntryIncomm, Incomm
  3040.   Door Source 4.0B
  3041.   Programmer's Manual - Page 90
  3042.  
  3043.         QSend
  3044.  
  3045.         Purpose: To send a string local and remote quickly without the
  3046.         extra bells and whistles of Send.
  3047.  
  3048.         Syntax: CALL QSend(Text$, Send.Enter)
  3049.  
  3050.         Remarks: QSend is a very basic sending routine that simply sends
  3051.         the given string to the local and remote screens. @X and other
  3052.         substitution codes are the only form of color control in the
  3053.         strings passed. Extra variables and parameters that affect Send
  3054.         don't affect QSend.
  3055.  
  3056.         Parameters Passed:
  3057.                 Text$ - The string to be sent
  3058.  
  3059.                 Send.Enter - Send a CR/LF after sending is complete
  3060.                              (1 = Yes  0 = No)
  3061.  
  3062.         Parameters Returned: None
  3063.  
  3064.         Example:
  3065.                 Text$ = "This will be displayed in the last color used."
  3066.                 CALL QSend(Text$, Yes)
  3067.  
  3068.         See Also: BlockSend, ColorEasy, RainbowSend, Send, QSend
  3069.  
  3070.   Door Source 4.0B
  3071.   Programmer's Manual - Page 91
  3072.  
  3073.         RainbowSend
  3074.  
  3075.         Purpose: To display text in a color, rainbow like form
  3076.  
  3077.         Syntax: CALL RainbowSend(Text$, Bell, Enter, Color.To.Use)
  3078.  
  3079.         Remarks: This is a creative way to display text to both displays.
  3080.         It will take the color given to use, and rotate through the colors
  3081.         making a very colorful display. Experiment with different colors
  3082.         to find the most desirable effect.
  3083.  
  3084.         Parameters Passed:
  3085.                 Text$ - Text to be displayed
  3086.  
  3087.                 Bell - Sound the remote speaker, and local is page bell is on
  3088.  
  3089.                 Enter - Send a CR/LF sequence once displaying is done
  3090.  
  3091.                 Color.To.Use - Foreground color to display text in
  3092.  
  3093.         Parameters Returned: None
  3094.  
  3095.         Example:
  3096.                 Text$ = "This will be displayed"
  3097.                 CALL RainbowSend(Text$, No, Yes, 10)
  3098.  
  3099.         See Also: BlockSend, ColorEasy, Send, QSend
  3100.   Door Source 4.0B
  3101.   Programmer's Manual - Page 92
  3102.  
  3103.         RandNum
  3104.  
  3105.         Purpose: To generate a random number within a specified range
  3106.  
  3107.         Syntax: Number = RandNum(Low, High)
  3108.  
  3109.         Remarks: This is handy to generate a random number in the range
  3110.         that you need it. It will generate a completely random number.
  3111.  
  3112.         Parameters Passed:
  3113.                 Low - The lowest number desired
  3114.  
  3115.                 High - The highest number desired
  3116.  
  3117.         Parameters Returned:
  3118.                 Number - The random number generated
  3119.  
  3120.         Example:
  3121.                 CALL Send("The number is "+STR$(RandNum(10,20)), No, Yes, 10)
  3122.  
  3123.  
  3124.   Door Source 4.0B
  3125.   Programmer's Manual - Page 93
  3126.  
  3127.         ReadUsers
  3128.  
  3129.         Purpose: To read from the PCBoard 14.x users file
  3130.  
  3131.         Syntax: CALL ReadUsers(ErrCode)
  3132.  
  3133.         Remarks: This will read the user's record from the PCBoard user file
  3134.         specified in the global variable UserFile$. The data will be read into
  3135.         the global type declaration UserBlock (Which is shown in Appendix D -
  3136.         Variable Reference). For other bbs types, most of the data is loaded
  3137.         directly from the bbs interface file, and calling a routine to read
  3138.         the users file is not necessary. The best way to set UserFile$ is
  3139.         to add on another line to the configuration file and read it in
  3140.         yourself after the first call to ClrScrn.
  3141.  
  3142.         Parameters Passed: None
  3143.  
  3144.         Parameters Returned:
  3145.                 ErrCode - This is the error code is a error occurred
  3146.                           1 - Users file not found
  3147.                           2 - Wrong BBS type
  3148.                           3 - UserFile$ not set to Drive/Path/Filename of users
  3149.                               file
  3150.  
  3151.         Example:
  3152.                 See BLCKDEMO.BAS
  3153.  
  3154.                 ' UserFile$ already set earlier in the program
  3155.                 CALL ReadUsers(ErrCode)
  3156.                 CALL Send("You're from "+STR$(UserBlock.CityState), No,Yes,10)
  3157.  
  3158.         See Also: WriteUsers
  3159.   Door Source 4.0B
  3160.   Programmer's Manual - Page 94
  3161.  
  3162.         Send
  3163.  
  3164.         Purpose: To display a string to local and remote screens
  3165.  
  3166.         Syntax: CALL Send(Text$, Send.Bell, Send.Enter, Color.To.Use)
  3167.  
  3168.         Remarks: This is the basic sending routine and it will display
  3169.         to the local and remote screens. This routine will accept @X codes
  3170.         and other substitution codes and display the proper things in
  3171.         response to it. A few variables affect this routine's output, here's
  3172.         a list:
  3173.                 BackGroundColor - Background color to be used
  3174.  
  3175.                 TabSpace - The text will be tabbed to this column for display
  3176.  
  3177.         Parameters Passed:
  3178.                 Text$ - The string to be displayed
  3179.  
  3180.                 Send.Bell - Will sound the speaker on the remote and will
  3181.                             also sound the local ONLY if the page bell is on.
  3182.                             (1 = Yes  0 = No)
  3183.  
  3184.                 Send.Enter - Send a CR/LF sequence once displaying is done
  3185.                              (1 = Yes  0 = No)
  3186.  
  3187.                 Color.To.Use - Foreground color to display in
  3188.  
  3189.         Parameters Returned: None
  3190.  
  3191.         Example:
  3192.                 Text$ = "This will be displayed!"
  3193.                 CALL Send(Text$, No, Yes, 10)
  3194.  
  3195.         See Also: BlockSend, ColorEasy, RainbowSend, QSend, WindowPrint
  3196.   Door Source 4.0B
  3197.   Programmer's Manual - Page 95
  3198.  
  3199.         ShellToDOS
  3200.  
  3201.         Purpose: To efficiently shell to DOS in order to avoid conflicts
  3202.  
  3203.         Syntax: CALL ShellToDOS(Shell.String$)
  3204.  
  3205.         Remarks: This will let Door Source completely wrap up all of its
  3206.         operations (actually close the com port, but uphold DTR and carrier)
  3207.         so that shelling to a external file transfer program is possible
  3208.         without a conflict of interrupts. This command duplicates what
  3209.         a SHELL command would do in BASIC, but gives Door Source a chance
  3210.         to clean up itself.
  3211.  
  3212.         Parameters Passed:
  3213.                 Shell.String$ - This is the command to be executed once the
  3214.                                 shell is started
  3215.  
  3216.         Parameters Returned: None
  3217.  
  3218.         Example:
  3219.                 Shell.String$ = "DIR >OUTPUT.TXT"
  3220.                 CALL ShellToDOS(Shell.String$)
  3221.   Door Source 4.0B
  3222.   Programmer's Manual - Page 96
  3223.  
  3224.         Sorter
  3225.  
  3226.         Purpose: To sort numbers into descending order
  3227.  
  3228.         Syntax: CALL Sorter(ParArray$(), Number.To.Sort)
  3229.  
  3230.         Remarks: If you need to sort numbers parsed with parser, or other
  3231.         numbers in a STRING array, then call this routine and it will
  3232.         sort it into a descending order.
  3233.  
  3234.         Parameters Passed:
  3235.                 ParArray$() - The array of numbers to be sorted
  3236.  
  3237.                 Number.To.Sort - The number of array elements to sort
  3238.  
  3239.         Parameters Returned:
  3240.                 ParArray$() - The sorted array
  3241.  
  3242.         Example:
  3243.                 ParArray$(1) = "400"
  3244.                 ParArray$(2) = "200"
  3245.                 ParArray$(3) = "600"
  3246.                 CALL Sorter(ParArray$(), 3)
  3247.                 FOR X=1 TO 3
  3248.                    CALL Send(ParArray$(X), No, Yes, 10)
  3249.                 NEXT X
  3250.                 ' Output would be this:
  3251.                 ' 600
  3252.                 ' 400
  3253.                 ' 200
  3254.  
  3255.   Door Source 4.0B
  3256.   Programmer's Manual - Page 97
  3257.  
  3258.         SysopPage
  3259.  
  3260.         Purpose: To page the sysop if the page bell is on
  3261.  
  3262.         Syntax: CALL SysopPage(Answered)
  3263.  
  3264.         Remarks: This routine will check the page bell, and if on, will
  3265.         page the sysop using the paging sounds. If the page wasn't answered
  3266.         or the sysop isn't around then it will return a 0 in the parameter.
  3267.         This routine is affect by several global variables, which are:
  3268.                 PageSound.1 - Sound #1 to be in the "beep" sound of the page
  3269.  
  3270.                 PageSound.2 - Sound #2 to be in the "beep" sound of the page
  3271.  
  3272.                 PageSound.3 - Sound #3 to be in the "beep" sound of the page
  3273.  
  3274.                 Page.String$ - String to show while paging the sysop
  3275.  
  3276.                 Not.Around$ - String to show when the sysop is not around
  3277.  
  3278.         Parameters Passed: None
  3279.  
  3280.         Parameters Returned:
  3281.                 Answered - If the page was answered
  3282.                            (1 = Yes  0 = No)
  3283.  
  3284.         Example:
  3285.                 CALL SysopPage(Answered)
  3286.  
  3287.   Door Source 4.0B
  3288.   Programmer's Manual - Page 98
  3289.  
  3290.         TimeConvert
  3291.  
  3292.         Purpose: To convert from two variables into the HH:MM format
  3293.  
  3294.         Syntax: CALL TimeConvert(Hours, Minutes, NewTime$)
  3295.  
  3296.         Remarks: This will combine hours and minutes into the HH:MM format.
  3297.  
  3298.         Parameters Passed:
  3299.                 Hours - The hour
  3300.  
  3301.                 Minutes - The minute
  3302.  
  3303.         Parameters Returned:
  3304.                 NewTime$ - The hour and minute in HH:MM format
  3305.  
  3306.         Example:
  3307.                 Hours = 10
  3308.                 Minutes = 30
  3309.                 CALL TimeConvert(Hours, Minutes, NewTime$)
  3310.                 CALL Send(NewTime$+" is the next event time.", No, Yes, 10)
  3311.  
  3312.         See Also: GetTime
  3313.  
  3314.  
  3315.   Door Source 4.0B
  3316.   Programmer's Manual - Page 99
  3317.  
  3318.         ViewFile
  3319.  
  3320.         Purpose: To display a file to the local and remote screens
  3321.  
  3322.         Syntax: CALL ViewFile(FileName$, ANSICheck, MorePrompts, ExitPrompt)
  3323.  
  3324.         Remarks: This will display a ANSI or non-ANSI screen to both screens.
  3325.         If you specify to check for a ANSI version of the file, then Door
  3326.         Source will take the filename given, add a G to it, and look for
  3327.         the existence of that file for ANSI users. You can enable more
  3328.         prompts for documentation, or leave them off for long ANSI screens.
  3329.         The exit prompt is a "Press [ANY KEY] to continue" prompt that
  3330.         is display at the end of the file if told to do so. The user can
  3331.         abort the screen at any point by pressing the space bar, CTRL-X, or
  3332.         CTRL-K. If the No.Abort global variable is set to 1 (Yes) then
  3333.         the user can't abort the display. ANSI files should NOT exceed
  3334.         80 characters in length per line.
  3335.  
  3336.         Parameters Passed:
  3337.                 FileName$ - Drive/Path/Filename of file to display
  3338.  
  3339.                 ANSICheck - Check for ANSI version of file for ANSI users
  3340.                             (1 = Yes  0 = No)
  3341.  
  3342.                 MorePrompts - Display more prompts every 23 lines
  3343.                               (1 = Yes  0 = No)
  3344.  
  3345.                 ExitPrompts - Displays a "Press [ANY KEY]" prompt at end of
  3346.                               display (1 = Yes  0 = No)
  3347.  
  3348.         Parameters Returned: None
  3349.  
  3350.         Example:
  3351.                 FileName$ = "MYFILE"
  3352.                 CALL ViewFile(FileName$, Yes, No, Yes)
  3353.                 FileName$ = "MYDOCS.DOC"
  3354.                 CALL ViewFile(FileName$, No, Yes, Yes)
  3355.   Door Source 4.0B
  3356.   Programmer's Manual - Page 100
  3357.  
  3358.         WaitASec
  3359.  
  3360.         Purpose: To delay the program the specified number of seconds
  3361.  
  3362.         Syntax: CALL WaitASec(Number.Of.Seconds)
  3363.  
  3364.         Remarks: Using the SLEEP command, or a FOR loop to delay a program
  3365.         isn't often a good idea in a door because the user could drop carrier.
  3366.         This routine will delay the program correctly for the number of
  3367.         seconds specified and will also keep track of the carrier signal.
  3368.  
  3369.         Parameters Passed:
  3370.                 Number.Of.Seconds - Number of seconds to delay program
  3371.  
  3372.         Parameters Returned: None
  3373.  
  3374.         Example:
  3375.                 CALL WaitASec(5)        ' delay 5 seconds
  3376.  
  3377.   Door Source 4.0B
  3378.   Programmer's Manual - Page 102
  3379.  
  3380.         WindowInput
  3381.  
  3382.         Purpose: To display a prompt and get input from inside a window
  3383.  
  3384.         Syntax: CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  3385.  
  3386.         Remarks: This works just like the Incomm routine, but does the
  3387.         I/O inside of a window created with the Windows routine. The
  3388.         MaxLength should be just right so that input won't overflow the
  3389.         window border and cause problems with erasing it.
  3390.  
  3391.         Parameters Passed:
  3392.                 Text$ - Prompt to be displayed
  3393.  
  3394.                 MaxLength - Maximum number of characters allowed in input
  3395.  
  3396.                 Row - Row to display at (horizontal)
  3397.  
  3398.                 Col - Column to display at (vertical)
  3399.  
  3400.                 Fore - Foreground color to display prompt in
  3401.  
  3402.                 Back - Background color to display prompt in
  3403.  
  3404.         Parameters Returned:
  3405.                 ARG$ - The input received
  3406.  
  3407.         Example:
  3408.                 Text$ = "Enter your name:"
  3409.                 MaxLength = 25: Row = 13: Col = 12
  3410.                 Fore = 15: Back = 1
  3411.                 CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  3412.  
  3413.         See Also: Windows, WindowPrint
  3414.   Door Source 4.0B
  3415.   Programmer's Manual - Page 102
  3416.  
  3417.         WindowPrint
  3418.  
  3419.         Purpose: To display text inside of a window
  3420.  
  3421.         Syntax: CALL WindowPrint(Text$, Row, Col, Fore, Back)
  3422.  
  3423.         Remarks: This is an easy way of displaying text anywhere inside of
  3424.         a window made with the Windows routine. It can also be used for
  3425.         quick short displays that aren't at the current cursor location.
  3426.  
  3427.         Parameters Passed:
  3428.                 Text$ - Text to be displayed
  3429.  
  3430.                 Row - Row to display at (horizontal)
  3431.  
  3432.                 Col - Column to display at (vertical)
  3433.  
  3434.                 Fore - Foreground color to display with
  3435.  
  3436.                 Back - Background color to display with
  3437.  
  3438.         Parameters Returned: None
  3439.  
  3440.         Example:
  3441.                 Text$ = "This will be displayed"
  3442.                 Row = 12: Col = 12: Fore = 15: Back = 1
  3443.                 CALL WindowPrint(Text$, Row, Col, Fore, Back)
  3444.  
  3445.         See Also: Windows, WindowInput
  3446.   Door Source 4.0B
  3447.   Programmer's Manual - Page 103
  3448.  
  3449.         Windows
  3450.  
  3451.         Purpose: To draw window on the local and remote screens
  3452.  
  3453.         Syntax: CALL Windows(ULR, ULC, LRR, LRC, Fore, Back, Border, Shadow)
  3454.  
  3455.         Remarks: This will draw a border enclosed area on the screen, and
  3456.         will even make a shadow if requested. Printing and input is done
  3457.         inside the window with WindowPrint and WindowInput. This is a
  3458.         ANSI only routine, and shouldn't be used with non-ANSI users.
  3459.  
  3460.         Parameters Passed:
  3461.                 ULR - Upper Lefthand row
  3462.  
  3463.                 ULC - Upper Lefthand column
  3464.  
  3465.                 LRR - Lower Righthand row
  3466.  
  3467.                 LRC - Lower Righthand column
  3468.  
  3469.                 Fore - Foreground color to use for border
  3470.  
  3471.                 Back - Background color to use for border and to fill inside
  3472.  
  3473.                 Border - The border number
  3474.                          1 - Single line
  3475.                          2 - Double line
  3476.                          3 - Double horizontal, Single vertical
  3477.                          4 - Single horizontal, Double vertical
  3478.  
  3479.                 Shadow - Makes a shadow on the window
  3480.                          (1 = Yes  0 = No)
  3481.  
  3482.         Parameters Returned: None
  3483.  
  3484.         Example:
  3485.                 ULR = 10: ULC = 10
  3486.                 LRR = 20: LRC = 70
  3487.                 CALL Windows(ULR, ULC, LRR, LRC, 11, 1, 4, Yes)
  3488.  
  3489.         See Also: WindowInput, WindowPrint
  3490.   Door Source 4.0B
  3491.   Programmer's Manual - Page 104
  3492.  
  3493.         WriteUsers
  3494.  
  3495.         Purpose: To write to PCBoard 14.x user file
  3496.  
  3497.         Syntax: CALL WriteUsers(ErrCode)
  3498.  
  3499.         Remarks: This will write the user's record to the PCBoard user file
  3500.         specified in the global variable UserFile$. The data written will be
  3501.         from the global type declaration UserBlock (Which is shown in Appendix
  3502.         D - Variable Reference). For other bbs types, most of the data is
  3503.         written when ExitDoor is called, and calling a routine to write to
  3504.         the users file is not necessary. The best way to set UserFile$ is
  3505.         to add on another line to the configuration file and read it in
  3506.         yourself after the first call to ClrScrn.
  3507.  
  3508.         Parameters Passed: None
  3509.  
  3510.         Parameters Returned:
  3511.                 ErrCode - This is the error code is a error occurred
  3512.                           1 - Users file not found
  3513.                           2 - Wrong BBS type
  3514.                           3 - UserFile$ not set to Drive/Path/Filename of users
  3515.                               file
  3516.  
  3517.         Example:
  3518.                 See BLCKDEMO.BAS
  3519.  
  3520.                 ' UserFile$ already set earlier in the program
  3521.                UserBlock.CityState = "Anytown, USA"
  3522.                CALL ReadUsers(ErrCode)
  3523.  
  3524.         See Also: ReadUsers
  3525.  
  3526.